star.carbon 474 B

123456789101112131415161718
  1. // Part of the Carbon Language project, under the Apache License v2.0 with LLVM
  2. // Exceptions. See /LICENSE for license information.
  3. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  4. package ExecutableSemanticsTest api;
  5. // Never actually called, so this only tests typechecking and semantic analysis.
  6. fn F(n: i32, p: i32*, q: i32***) -> i32* {
  7. var a: i32 = n * *p;
  8. var b: i32 = a*n;
  9. *p = b*(*p);
  10. **q = p;
  11. return **q;
  12. }
  13. fn main() -> i32 {
  14. return 0;
  15. }