star.carbon 436 B

12345678910111213141516
  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. // Never actually called, so this only tests typechecking and semantic analysis.
  5. fn F(n: i32, p: i32*, q: i32***) -> i32* {
  6. var a: i32 = n * *p;
  7. var b: i32 = a*n;
  8. *p = b*(*p);
  9. **q = p;
  10. return **q;
  11. }
  12. fn main() -> i32 {
  13. return 0;
  14. }