address_of_unused.carbon 557 B

12345678910111213141516171819
  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. //
  5. // AUTOUPDATE
  6. fn F() {
  7. var n: i32 = 0;
  8. &n;
  9. }
  10. // CHECK:STDOUT: ; ModuleID = 'address_of_unused.carbon'
  11. // CHECK:STDOUT: source_filename = "address_of_unused.carbon"
  12. // CHECK:STDOUT:
  13. // CHECK:STDOUT: define void @F() {
  14. // CHECK:STDOUT: %n = alloca i32, align 4
  15. // CHECK:STDOUT: store i32 0, ptr %n, align 4
  16. // CHECK:STDOUT: ret void
  17. // CHECK:STDOUT: }