address_of_lvalue.carbon 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230
  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. // TIP: To test this file alone, run:
  7. // TIP: bazel test //toolchain/testing:file_test --test_arg=--file_tests=toolchain/check/testdata/pointer/address_of_lvalue.carbon
  8. // TIP: To dump output, run:
  9. // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/pointer/address_of_lvalue.carbon
  10. fn F() {
  11. var s: {.a: i32, .b: i32} = {.a = 1, .b = 2};
  12. var p: {.a: i32, .b: i32}* = &s;
  13. var q: i32* = &s.a;
  14. var r: i32* = &s.b;
  15. var t: (i32, i32) = (1, 2);
  16. var t0: i32* = &t.0;
  17. var t1: i32* = &t.1;
  18. }
  19. // CHECK:STDOUT: --- address_of_lvalue.carbon
  20. // CHECK:STDOUT:
  21. // CHECK:STDOUT: constants {
  22. // CHECK:STDOUT: %F.type: type = fn_type @F [concrete]
  23. // CHECK:STDOUT: %F: %F.type = struct_value () [concrete]
  24. // CHECK:STDOUT: %int_32: Core.IntLiteral = int_value 32 [concrete]
  25. // CHECK:STDOUT: %i32: type = class_type @Int, @Int(%int_32) [concrete]
  26. // CHECK:STDOUT: %struct_type.a.b.501: type = struct_type {.a: %i32, .b: %i32} [concrete]
  27. // CHECK:STDOUT: %ptr.3ee: type = ptr_type %struct_type.a.b.501 [concrete]
  28. // CHECK:STDOUT: %int_1.5b8: Core.IntLiteral = int_value 1 [concrete]
  29. // CHECK:STDOUT: %int_2.ecc: Core.IntLiteral = int_value 2 [concrete]
  30. // CHECK:STDOUT: %struct_type.a.b.cfd: type = struct_type {.a: Core.IntLiteral, .b: Core.IntLiteral} [concrete]
  31. // CHECK:STDOUT: %ImplicitAs.type.205: type = facet_type <@ImplicitAs, @ImplicitAs(%i32)> [concrete]
  32. // CHECK:STDOUT: %Convert.type.1b6: type = fn_type @Convert.1, @ImplicitAs(%i32) [concrete]
  33. // CHECK:STDOUT: %impl_witness.d39: <witness> = impl_witness (imports.%Core.import_ref.a5b), @impl.4f9(%int_32) [concrete]
  34. // CHECK:STDOUT: %Convert.type.035: type = fn_type @Convert.2, @impl.4f9(%int_32) [concrete]
  35. // CHECK:STDOUT: %Convert.956: %Convert.type.035 = struct_value () [concrete]
  36. // CHECK:STDOUT: %ImplicitAs.facet: %ImplicitAs.type.205 = facet_value Core.IntLiteral, (%impl_witness.d39) [concrete]
  37. // CHECK:STDOUT: %.be7: type = fn_type_with_self_type %Convert.type.1b6, %ImplicitAs.facet [concrete]
  38. // CHECK:STDOUT: %Convert.bound.ab5: <bound method> = bound_method %int_1.5b8, %Convert.956 [concrete]
  39. // CHECK:STDOUT: %Convert.specific_fn: <specific function> = specific_function %Convert.956, @Convert.2(%int_32) [concrete]
  40. // CHECK:STDOUT: %bound_method.9a1: <bound method> = bound_method %int_1.5b8, %Convert.specific_fn [concrete]
  41. // CHECK:STDOUT: %int_1.5d2: %i32 = int_value 1 [concrete]
  42. // CHECK:STDOUT: %Convert.bound.ef9: <bound method> = bound_method %int_2.ecc, %Convert.956 [concrete]
  43. // CHECK:STDOUT: %bound_method.b92: <bound method> = bound_method %int_2.ecc, %Convert.specific_fn [concrete]
  44. // CHECK:STDOUT: %int_2.ef8: %i32 = int_value 2 [concrete]
  45. // CHECK:STDOUT: %struct: %struct_type.a.b.501 = struct_value (%int_1.5d2, %int_2.ef8) [concrete]
  46. // CHECK:STDOUT: %ptr.235: type = ptr_type %i32 [concrete]
  47. // CHECK:STDOUT: %tuple.type.24b: type = tuple_type (type, type) [concrete]
  48. // CHECK:STDOUT: %tuple.type.d07: type = tuple_type (%i32, %i32) [concrete]
  49. // CHECK:STDOUT: %tuple.type.f94: type = tuple_type (Core.IntLiteral, Core.IntLiteral) [concrete]
  50. // CHECK:STDOUT: %tuple: %tuple.type.d07 = tuple_value (%int_1.5d2, %int_2.ef8) [concrete]
  51. // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete]
  52. // CHECK:STDOUT: }
  53. // CHECK:STDOUT:
  54. // CHECK:STDOUT: imports {
  55. // CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [concrete] {
  56. // CHECK:STDOUT: .Int = %Core.Int
  57. // CHECK:STDOUT: .ImplicitAs = %Core.ImplicitAs
  58. // CHECK:STDOUT: import Core//prelude
  59. // CHECK:STDOUT: import Core//prelude/...
  60. // CHECK:STDOUT: }
  61. // CHECK:STDOUT: }
  62. // CHECK:STDOUT:
  63. // CHECK:STDOUT: file {
  64. // CHECK:STDOUT: package: <namespace> = namespace [concrete] {
  65. // CHECK:STDOUT: .Core = imports.%Core
  66. // CHECK:STDOUT: .F = %F.decl
  67. // CHECK:STDOUT: }
  68. // CHECK:STDOUT: %Core.import = import Core
  69. // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [concrete = constants.%F] {} {}
  70. // CHECK:STDOUT: }
  71. // CHECK:STDOUT:
  72. // CHECK:STDOUT: fn @F() {
  73. // CHECK:STDOUT: !entry:
  74. // CHECK:STDOUT: name_binding_decl {
  75. // CHECK:STDOUT: %s.patt: %struct_type.a.b.501 = binding_pattern s
  76. // CHECK:STDOUT: %.loc12_3.1: %struct_type.a.b.501 = var_pattern %s.patt
  77. // CHECK:STDOUT: }
  78. // CHECK:STDOUT: %s.var: ref %struct_type.a.b.501 = var s
  79. // CHECK:STDOUT: %int_1.loc12: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8]
  80. // CHECK:STDOUT: %int_2.loc12: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc]
  81. // CHECK:STDOUT: %.loc12_46.1: %struct_type.a.b.cfd = struct_literal (%int_1.loc12, %int_2.loc12)
  82. // CHECK:STDOUT: %impl.elem0.loc12_46.1: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956]
  83. // CHECK:STDOUT: %bound_method.loc12_46.1: <bound method> = bound_method %int_1.loc12, %impl.elem0.loc12_46.1 [concrete = constants.%Convert.bound.ab5]
  84. // CHECK:STDOUT: %specific_fn.loc12_46.1: <specific function> = specific_function %impl.elem0.loc12_46.1, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn]
  85. // CHECK:STDOUT: %bound_method.loc12_46.2: <bound method> = bound_method %int_1.loc12, %specific_fn.loc12_46.1 [concrete = constants.%bound_method.9a1]
  86. // CHECK:STDOUT: %int.convert_checked.loc12_46.1: init %i32 = call %bound_method.loc12_46.2(%int_1.loc12) [concrete = constants.%int_1.5d2]
  87. // CHECK:STDOUT: %.loc12_46.2: init %i32 = converted %int_1.loc12, %int.convert_checked.loc12_46.1 [concrete = constants.%int_1.5d2]
  88. // CHECK:STDOUT: %.loc12_46.3: ref %i32 = struct_access %s.var, element0
  89. // CHECK:STDOUT: %.loc12_46.4: init %i32 = initialize_from %.loc12_46.2 to %.loc12_46.3 [concrete = constants.%int_1.5d2]
  90. // CHECK:STDOUT: %impl.elem0.loc12_46.2: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956]
  91. // CHECK:STDOUT: %bound_method.loc12_46.3: <bound method> = bound_method %int_2.loc12, %impl.elem0.loc12_46.2 [concrete = constants.%Convert.bound.ef9]
  92. // CHECK:STDOUT: %specific_fn.loc12_46.2: <specific function> = specific_function %impl.elem0.loc12_46.2, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn]
  93. // CHECK:STDOUT: %bound_method.loc12_46.4: <bound method> = bound_method %int_2.loc12, %specific_fn.loc12_46.2 [concrete = constants.%bound_method.b92]
  94. // CHECK:STDOUT: %int.convert_checked.loc12_46.2: init %i32 = call %bound_method.loc12_46.4(%int_2.loc12) [concrete = constants.%int_2.ef8]
  95. // CHECK:STDOUT: %.loc12_46.5: init %i32 = converted %int_2.loc12, %int.convert_checked.loc12_46.2 [concrete = constants.%int_2.ef8]
  96. // CHECK:STDOUT: %.loc12_46.6: ref %i32 = struct_access %s.var, element1
  97. // CHECK:STDOUT: %.loc12_46.7: init %i32 = initialize_from %.loc12_46.5 to %.loc12_46.6 [concrete = constants.%int_2.ef8]
  98. // CHECK:STDOUT: %.loc12_46.8: init %struct_type.a.b.501 = struct_init (%.loc12_46.4, %.loc12_46.7) to %s.var [concrete = constants.%struct]
  99. // CHECK:STDOUT: %.loc12_3.2: init %struct_type.a.b.501 = converted %.loc12_46.1, %.loc12_46.8 [concrete = constants.%struct]
  100. // CHECK:STDOUT: assign %s.var, %.loc12_3.2
  101. // CHECK:STDOUT: %.loc12_27: type = splice_block %struct_type.a.b.loc12 [concrete = constants.%struct_type.a.b.501] {
  102. // CHECK:STDOUT: %int_32.loc12_15: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
  103. // CHECK:STDOUT: %i32.loc12_15: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
  104. // CHECK:STDOUT: %int_32.loc12_24: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
  105. // CHECK:STDOUT: %i32.loc12_24: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
  106. // CHECK:STDOUT: %struct_type.a.b.loc12: type = struct_type {.a: %i32, .b: %i32} [concrete = constants.%struct_type.a.b.501]
  107. // CHECK:STDOUT: }
  108. // CHECK:STDOUT: %s: ref %struct_type.a.b.501 = bind_name s, %s.var
  109. // CHECK:STDOUT: name_binding_decl {
  110. // CHECK:STDOUT: %p.patt: %ptr.3ee = binding_pattern p
  111. // CHECK:STDOUT: %.loc14_3: %ptr.3ee = var_pattern %p.patt
  112. // CHECK:STDOUT: }
  113. // CHECK:STDOUT: %p.var: ref %ptr.3ee = var p
  114. // CHECK:STDOUT: %s.ref.loc14: ref %struct_type.a.b.501 = name_ref s, %s
  115. // CHECK:STDOUT: %addr.loc14: %ptr.3ee = addr_of %s.ref.loc14
  116. // CHECK:STDOUT: assign %p.var, %addr.loc14
  117. // CHECK:STDOUT: %.loc14_28: type = splice_block %ptr.loc14 [concrete = constants.%ptr.3ee] {
  118. // CHECK:STDOUT: %int_32.loc14_15: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
  119. // CHECK:STDOUT: %i32.loc14_15: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
  120. // CHECK:STDOUT: %int_32.loc14_24: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
  121. // CHECK:STDOUT: %i32.loc14_24: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
  122. // CHECK:STDOUT: %struct_type.a.b.loc14: type = struct_type {.a: %i32, .b: %i32} [concrete = constants.%struct_type.a.b.501]
  123. // CHECK:STDOUT: %ptr.loc14: type = ptr_type %struct_type.a.b.loc14 [concrete = constants.%ptr.3ee]
  124. // CHECK:STDOUT: }
  125. // CHECK:STDOUT: %p: ref %ptr.3ee = bind_name p, %p.var
  126. // CHECK:STDOUT: name_binding_decl {
  127. // CHECK:STDOUT: %q.patt: %ptr.235 = binding_pattern q
  128. // CHECK:STDOUT: %.loc15_3: %ptr.235 = var_pattern %q.patt
  129. // CHECK:STDOUT: }
  130. // CHECK:STDOUT: %q.var: ref %ptr.235 = var q
  131. // CHECK:STDOUT: %s.ref.loc15: ref %struct_type.a.b.501 = name_ref s, %s
  132. // CHECK:STDOUT: %.loc15_19: ref %i32 = struct_access %s.ref.loc15, element0
  133. // CHECK:STDOUT: %addr.loc15: %ptr.235 = addr_of %.loc15_19
  134. // CHECK:STDOUT: assign %q.var, %addr.loc15
  135. // CHECK:STDOUT: %.loc15_13: type = splice_block %ptr.loc15 [concrete = constants.%ptr.235] {
  136. // CHECK:STDOUT: %int_32.loc15: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
  137. // CHECK:STDOUT: %i32.loc15: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
  138. // CHECK:STDOUT: %ptr.loc15: type = ptr_type %i32.loc15 [concrete = constants.%ptr.235]
  139. // CHECK:STDOUT: }
  140. // CHECK:STDOUT: %q: ref %ptr.235 = bind_name q, %q.var
  141. // CHECK:STDOUT: name_binding_decl {
  142. // CHECK:STDOUT: %r.patt: %ptr.235 = binding_pattern r
  143. // CHECK:STDOUT: %.loc16_3: %ptr.235 = var_pattern %r.patt
  144. // CHECK:STDOUT: }
  145. // CHECK:STDOUT: %r.var: ref %ptr.235 = var r
  146. // CHECK:STDOUT: %s.ref.loc16: ref %struct_type.a.b.501 = name_ref s, %s
  147. // CHECK:STDOUT: %.loc16_19: ref %i32 = struct_access %s.ref.loc16, element1
  148. // CHECK:STDOUT: %addr.loc16: %ptr.235 = addr_of %.loc16_19
  149. // CHECK:STDOUT: assign %r.var, %addr.loc16
  150. // CHECK:STDOUT: %.loc16_13: type = splice_block %ptr.loc16 [concrete = constants.%ptr.235] {
  151. // CHECK:STDOUT: %int_32.loc16: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
  152. // CHECK:STDOUT: %i32.loc16: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
  153. // CHECK:STDOUT: %ptr.loc16: type = ptr_type %i32.loc16 [concrete = constants.%ptr.235]
  154. // CHECK:STDOUT: }
  155. // CHECK:STDOUT: %r: ref %ptr.235 = bind_name r, %r.var
  156. // CHECK:STDOUT: name_binding_decl {
  157. // CHECK:STDOUT: %t.patt: %tuple.type.d07 = binding_pattern t
  158. // CHECK:STDOUT: %.loc18_3.1: %tuple.type.d07 = var_pattern %t.patt
  159. // CHECK:STDOUT: }
  160. // CHECK:STDOUT: %t.var: ref %tuple.type.d07 = var t
  161. // CHECK:STDOUT: %int_1.loc18: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8]
  162. // CHECK:STDOUT: %int_2.loc18: Core.IntLiteral = int_value 2 [concrete = constants.%int_2.ecc]
  163. // CHECK:STDOUT: %.loc18_28.1: %tuple.type.f94 = tuple_literal (%int_1.loc18, %int_2.loc18)
  164. // CHECK:STDOUT: %impl.elem0.loc18_28.1: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956]
  165. // CHECK:STDOUT: %bound_method.loc18_28.1: <bound method> = bound_method %int_1.loc18, %impl.elem0.loc18_28.1 [concrete = constants.%Convert.bound.ab5]
  166. // CHECK:STDOUT: %specific_fn.loc18_28.1: <specific function> = specific_function %impl.elem0.loc18_28.1, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn]
  167. // CHECK:STDOUT: %bound_method.loc18_28.2: <bound method> = bound_method %int_1.loc18, %specific_fn.loc18_28.1 [concrete = constants.%bound_method.9a1]
  168. // CHECK:STDOUT: %int.convert_checked.loc18_28.1: init %i32 = call %bound_method.loc18_28.2(%int_1.loc18) [concrete = constants.%int_1.5d2]
  169. // CHECK:STDOUT: %.loc18_28.2: init %i32 = converted %int_1.loc18, %int.convert_checked.loc18_28.1 [concrete = constants.%int_1.5d2]
  170. // CHECK:STDOUT: %tuple.elem0.loc18: ref %i32 = tuple_access %t.var, element0
  171. // CHECK:STDOUT: %.loc18_28.3: init %i32 = initialize_from %.loc18_28.2 to %tuple.elem0.loc18 [concrete = constants.%int_1.5d2]
  172. // CHECK:STDOUT: %impl.elem0.loc18_28.2: %.be7 = impl_witness_access constants.%impl_witness.d39, element0 [concrete = constants.%Convert.956]
  173. // CHECK:STDOUT: %bound_method.loc18_28.3: <bound method> = bound_method %int_2.loc18, %impl.elem0.loc18_28.2 [concrete = constants.%Convert.bound.ef9]
  174. // CHECK:STDOUT: %specific_fn.loc18_28.2: <specific function> = specific_function %impl.elem0.loc18_28.2, @Convert.2(constants.%int_32) [concrete = constants.%Convert.specific_fn]
  175. // CHECK:STDOUT: %bound_method.loc18_28.4: <bound method> = bound_method %int_2.loc18, %specific_fn.loc18_28.2 [concrete = constants.%bound_method.b92]
  176. // CHECK:STDOUT: %int.convert_checked.loc18_28.2: init %i32 = call %bound_method.loc18_28.4(%int_2.loc18) [concrete = constants.%int_2.ef8]
  177. // CHECK:STDOUT: %.loc18_28.4: init %i32 = converted %int_2.loc18, %int.convert_checked.loc18_28.2 [concrete = constants.%int_2.ef8]
  178. // CHECK:STDOUT: %tuple.elem1.loc18: ref %i32 = tuple_access %t.var, element1
  179. // CHECK:STDOUT: %.loc18_28.5: init %i32 = initialize_from %.loc18_28.4 to %tuple.elem1.loc18 [concrete = constants.%int_2.ef8]
  180. // CHECK:STDOUT: %.loc18_28.6: init %tuple.type.d07 = tuple_init (%.loc18_28.3, %.loc18_28.5) to %t.var [concrete = constants.%tuple]
  181. // CHECK:STDOUT: %.loc18_3.2: init %tuple.type.d07 = converted %.loc18_28.1, %.loc18_28.6 [concrete = constants.%tuple]
  182. // CHECK:STDOUT: assign %t.var, %.loc18_3.2
  183. // CHECK:STDOUT: %.loc18_19.1: type = splice_block %.loc18_19.3 [concrete = constants.%tuple.type.d07] {
  184. // CHECK:STDOUT: %int_32.loc18_11: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
  185. // CHECK:STDOUT: %i32.loc18_11: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
  186. // CHECK:STDOUT: %int_32.loc18_16: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
  187. // CHECK:STDOUT: %i32.loc18_16: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
  188. // CHECK:STDOUT: %.loc18_19.2: %tuple.type.24b = tuple_literal (%i32.loc18_11, %i32.loc18_16)
  189. // CHECK:STDOUT: %.loc18_19.3: type = converted %.loc18_19.2, constants.%tuple.type.d07 [concrete = constants.%tuple.type.d07]
  190. // CHECK:STDOUT: }
  191. // CHECK:STDOUT: %t: ref %tuple.type.d07 = bind_name t, %t.var
  192. // CHECK:STDOUT: name_binding_decl {
  193. // CHECK:STDOUT: %t0.patt: %ptr.235 = binding_pattern t0
  194. // CHECK:STDOUT: %.loc19_3: %ptr.235 = var_pattern %t0.patt
  195. // CHECK:STDOUT: }
  196. // CHECK:STDOUT: %t0.var: ref %ptr.235 = var t0
  197. // CHECK:STDOUT: %t.ref.loc19: ref %tuple.type.d07 = name_ref t, %t
  198. // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0]
  199. // CHECK:STDOUT: %tuple.elem0.loc19: ref %i32 = tuple_access %t.ref.loc19, element0
  200. // CHECK:STDOUT: %addr.loc19: %ptr.235 = addr_of %tuple.elem0.loc19
  201. // CHECK:STDOUT: assign %t0.var, %addr.loc19
  202. // CHECK:STDOUT: %.loc19_14: type = splice_block %ptr.loc19 [concrete = constants.%ptr.235] {
  203. // CHECK:STDOUT: %int_32.loc19: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
  204. // CHECK:STDOUT: %i32.loc19: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
  205. // CHECK:STDOUT: %ptr.loc19: type = ptr_type %i32.loc19 [concrete = constants.%ptr.235]
  206. // CHECK:STDOUT: }
  207. // CHECK:STDOUT: %t0: ref %ptr.235 = bind_name t0, %t0.var
  208. // CHECK:STDOUT: name_binding_decl {
  209. // CHECK:STDOUT: %t1.patt: %ptr.235 = binding_pattern t1
  210. // CHECK:STDOUT: %.loc20_3: %ptr.235 = var_pattern %t1.patt
  211. // CHECK:STDOUT: }
  212. // CHECK:STDOUT: %t1.var: ref %ptr.235 = var t1
  213. // CHECK:STDOUT: %t.ref.loc20: ref %tuple.type.d07 = name_ref t, %t
  214. // CHECK:STDOUT: %int_1.loc20: Core.IntLiteral = int_value 1 [concrete = constants.%int_1.5b8]
  215. // CHECK:STDOUT: %tuple.elem1.loc20: ref %i32 = tuple_access %t.ref.loc20, element1
  216. // CHECK:STDOUT: %addr.loc20: %ptr.235 = addr_of %tuple.elem1.loc20
  217. // CHECK:STDOUT: assign %t1.var, %addr.loc20
  218. // CHECK:STDOUT: %.loc20_14: type = splice_block %ptr.loc20 [concrete = constants.%ptr.235] {
  219. // CHECK:STDOUT: %int_32.loc20: Core.IntLiteral = int_value 32 [concrete = constants.%int_32]
  220. // CHECK:STDOUT: %i32.loc20: type = class_type @Int, @Int(constants.%int_32) [concrete = constants.%i32]
  221. // CHECK:STDOUT: %ptr.loc20: type = ptr_type %i32.loc20 [concrete = constants.%ptr.235]
  222. // CHECK:STDOUT: }
  223. // CHECK:STDOUT: %t1: ref %ptr.235 = bind_name t1, %t1.var
  224. // CHECK:STDOUT: return
  225. // CHECK:STDOUT: }
  226. // CHECK:STDOUT: