global_decl_with_init.carbon 767 B

12345678910111213141516171819202122
  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. var x: i32 = 0;
  7. // CHECK:STDOUT: --- global_decl_with_init.carbon
  8. // CHECK:STDOUT:
  9. // CHECK:STDOUT: constants {
  10. // CHECK:STDOUT: %.1: i32 = int_literal 0 [template]
  11. // CHECK:STDOUT: }
  12. // CHECK:STDOUT:
  13. // CHECK:STDOUT: file {
  14. // CHECK:STDOUT: package: <namespace> = namespace package, {.x = %x} [template]
  15. // CHECK:STDOUT: %x.var: ref i32 = var x
  16. // CHECK:STDOUT: %x: ref i32 = bind_name x, %x.var
  17. // CHECK:STDOUT: %.loc7: i32 = int_literal 0 [template = constants.%.1]
  18. // CHECK:STDOUT: assign %x.var, %.loc7
  19. // CHECK:STDOUT: }
  20. // CHECK:STDOUT: