parens.carbon 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  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 a: i32 = (1);
  7. var b: i32 = ((2));
  8. // CHECK:STDOUT: --- parens.carbon
  9. // CHECK:STDOUT:
  10. // CHECK:STDOUT: constants {
  11. // CHECK:STDOUT: %Int32: type = fn_type @Int32 [template]
  12. // CHECK:STDOUT: %.1: type = tuple_type () [template]
  13. // CHECK:STDOUT: %struct: Int32 = struct_value () [template]
  14. // CHECK:STDOUT: %.2: i32 = int_literal 1 [template]
  15. // CHECK:STDOUT: %.3: i32 = int_literal 2 [template]
  16. // CHECK:STDOUT: }
  17. // CHECK:STDOUT:
  18. // CHECK:STDOUT: file {
  19. // CHECK:STDOUT: package: <namespace> = namespace [template] {
  20. // CHECK:STDOUT: .Core = %Core
  21. // CHECK:STDOUT: .a = %a
  22. // CHECK:STDOUT: .b = %b
  23. // CHECK:STDOUT: }
  24. // CHECK:STDOUT: %Core: <namespace> = namespace [template] {}
  25. // CHECK:STDOUT: %import_ref.1: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct]
  26. // CHECK:STDOUT: %int.make_type_32.loc7: init type = call constants.%struct() [template = i32]
  27. // CHECK:STDOUT: %.loc7_8.1: type = value_of_initializer %int.make_type_32.loc7 [template = i32]
  28. // CHECK:STDOUT: %.loc7_8.2: type = converted %int.make_type_32.loc7, %.loc7_8.1 [template = i32]
  29. // CHECK:STDOUT: %a.var: ref i32 = var a
  30. // CHECK:STDOUT: %a: ref i32 = bind_name a, %a.var
  31. // CHECK:STDOUT: %import_ref.2: Int32 = import_ref ir3, inst+3, loaded [template = constants.%struct]
  32. // CHECK:STDOUT: %int.make_type_32.loc8: init type = call constants.%struct() [template = i32]
  33. // CHECK:STDOUT: %.loc8_8.1: type = value_of_initializer %int.make_type_32.loc8 [template = i32]
  34. // CHECK:STDOUT: %.loc8_8.2: type = converted %int.make_type_32.loc8, %.loc8_8.1 [template = i32]
  35. // CHECK:STDOUT: %b.var: ref i32 = var b
  36. // CHECK:STDOUT: %b: ref i32 = bind_name b, %b.var
  37. // CHECK:STDOUT: }
  38. // CHECK:STDOUT:
  39. // CHECK:STDOUT: fn @Int32() -> type = "int.make_type_32";
  40. // CHECK:STDOUT:
  41. // CHECK:STDOUT: fn @__global_init() {
  42. // CHECK:STDOUT: !entry:
  43. // CHECK:STDOUT: %.loc7: i32 = int_literal 1 [template = constants.%.2]
  44. // CHECK:STDOUT: assign file.%a.var, %.loc7
  45. // CHECK:STDOUT: %.loc8: i32 = int_literal 2 [template = constants.%.3]
  46. // CHECK:STDOUT: assign file.%b.var, %.loc8
  47. // CHECK:STDOUT: return
  48. // CHECK:STDOUT: }
  49. // CHECK:STDOUT: