basics.carbon 36 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525
  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. // INCLUDE-FILE: toolchain/testing/testdata/min_prelude/convert.carbon
  6. //
  7. // AUTOUPDATE
  8. // TIP: To test this file alone, run:
  9. // TIP: bazel test //toolchain/testing:file_test --test_arg=--file_tests=toolchain/check/testdata/array/basics.carbon
  10. // TIP: To dump output, run:
  11. // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/array/basics.carbon
  12. // --- assign_var.carbon
  13. library "[[@TEST_NAME]]";
  14. var a: ((), (), ());
  15. //@dump-sem-ir-begin
  16. var b: array((), 3) = a;
  17. //@dump-sem-ir-end
  18. // --- assign_arity.carbon
  19. var a0: array((), 0) = ();
  20. var a1: array((), 1) = ((),);
  21. var a2: array((), 2) = ((), ());
  22. // --- array_in_place.carbon
  23. library "[[@TEST_NAME]]";
  24. class C {}
  25. fn F() -> (C, C, C);
  26. fn G() {
  27. //@dump-sem-ir-begin
  28. var v: array((C, C, C), 2) = (F(), F());
  29. //@dump-sem-ir-end
  30. }
  31. // --- array_vs_tuple.carbon
  32. library "[[@TEST_NAME]]";
  33. fn G() {
  34. // These should have two different constant values.
  35. //@dump-sem-ir-begin
  36. var a: array((), 3);
  37. var b: ((), (), ());
  38. //@dump-sem-ir-end
  39. }
  40. // --- assign_return_value.carbon
  41. library "[[@TEST_NAME]]";
  42. fn F() -> ((),) { return ((),); }
  43. fn Run() {
  44. //@dump-sem-ir-begin
  45. var t: array((), 1) = F();
  46. //@dump-sem-ir-end
  47. }
  48. // --- nine_elements.carbon
  49. library "[[@TEST_NAME]]";
  50. var a: ((), (), (), (), (), (), (), (), ()) =
  51. ((), (), (), (), (), (), (), (), ());
  52. // Regression test for APInt handling.
  53. //@dump-sem-ir-begin
  54. var b: array((), 9) = a;
  55. //@dump-sem-ir-end
  56. // --- fail_incomplete_element.carbon
  57. library "[[@TEST_NAME]]";
  58. class Incomplete;
  59. // CHECK:STDERR: fail_incomplete_element.carbon:[[@LINE+7]]:8: error: binding pattern has incomplete type `array(Incomplete, 1)` in name binding declaration [IncompleteTypeInBindingDecl]
  60. // CHECK:STDERR: var a: array(Incomplete, 1);
  61. // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~
  62. // CHECK:STDERR: fail_incomplete_element.carbon:[[@LINE-5]]:1: note: class was forward declared here [ClassForwardDeclaredHere]
  63. // CHECK:STDERR: class Incomplete;
  64. // CHECK:STDERR: ^~~~~~~~~~~~~~~~~
  65. // CHECK:STDERR:
  66. var a: array(Incomplete, 1);
  67. var p: Incomplete* = &a[0];
  68. // --- fail_invalid_element.carbon
  69. library "[[@TEST_NAME]]";
  70. // CHECK:STDERR: fail_invalid_element.carbon:[[@LINE+7]]:14: error: cannot implicitly convert non-type value of type `Core.IntLiteral` to `type` [ConversionFailureNonTypeToFacet]
  71. // CHECK:STDERR: var a: array(1, 1);
  72. // CHECK:STDERR: ^
  73. // CHECK:STDERR: fail_invalid_element.carbon:[[@LINE+4]]:14: note: type `Core.IntLiteral` does not implement interface `Core.ImplicitAs(type)` [MissingImplInMemberAccessNote]
  74. // CHECK:STDERR: var a: array(1, 1);
  75. // CHECK:STDERR: ^
  76. // CHECK:STDERR:
  77. var a: array(1, 1);
  78. // CHECK:STDOUT: --- assign_var.carbon
  79. // CHECK:STDOUT:
  80. // CHECK:STDOUT: constants {
  81. // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
  82. // CHECK:STDOUT: %tuple.type: type = tuple_type (%empty_tuple.type, %empty_tuple.type, %empty_tuple.type) [concrete]
  83. // CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [concrete]
  84. // CHECK:STDOUT: %array_type: type = array_type %int_3, %empty_tuple.type [concrete]
  85. // CHECK:STDOUT: %pattern_type.035: type = pattern_type %array_type [concrete]
  86. // CHECK:STDOUT: %tuple.elem0: ref %empty_tuple.type = tuple_access file.%a.var, element0 [concrete]
  87. // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete]
  88. // CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [concrete]
  89. // CHECK:STDOUT: %tuple.elem1: ref %empty_tuple.type = tuple_access file.%a.var, element1 [concrete]
  90. // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete]
  91. // CHECK:STDOUT: %tuple.elem2: ref %empty_tuple.type = tuple_access file.%a.var, element2 [concrete]
  92. // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete]
  93. // CHECK:STDOUT: %array: %array_type = tuple_value (%empty_tuple, %empty_tuple, %empty_tuple) [concrete]
  94. // CHECK:STDOUT: }
  95. // CHECK:STDOUT:
  96. // CHECK:STDOUT: imports {
  97. // CHECK:STDOUT: }
  98. // CHECK:STDOUT:
  99. // CHECK:STDOUT: file {
  100. // CHECK:STDOUT: name_binding_decl {
  101. // CHECK:STDOUT: %b.patt: %pattern_type.035 = binding_pattern b [concrete]
  102. // CHECK:STDOUT: %b.var_patt: %pattern_type.035 = var_pattern %b.patt [concrete]
  103. // CHECK:STDOUT: }
  104. // CHECK:STDOUT: %b.var: ref %array_type = var %b.var_patt [concrete]
  105. // CHECK:STDOUT: %.loc6_19: type = splice_block %array_type [concrete = constants.%array_type] {
  106. // CHECK:STDOUT: %.loc6_15.1: %empty_tuple.type = tuple_literal ()
  107. // CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [concrete = constants.%int_3]
  108. // CHECK:STDOUT: %.loc6_15.2: type = converted %.loc6_15.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type]
  109. // CHECK:STDOUT: %array_type: type = array_type %int_3, %.loc6_15.2 [concrete = constants.%array_type]
  110. // CHECK:STDOUT: }
  111. // CHECK:STDOUT: %b: ref %array_type = bind_name b, %b.var [concrete = %b.var]
  112. // CHECK:STDOUT: }
  113. // CHECK:STDOUT:
  114. // CHECK:STDOUT: fn @__global_init() {
  115. // CHECK:STDOUT: !entry:
  116. // CHECK:STDOUT: %a.ref: ref %tuple.type = name_ref a, file.%a [concrete = file.%a.var]
  117. // CHECK:STDOUT: %tuple.elem0: ref %empty_tuple.type = tuple_access %a.ref, element0 [concrete = constants.%tuple.elem0]
  118. // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0]
  119. // CHECK:STDOUT: %.loc6_23.1: ref %empty_tuple.type = array_index file.%b.var, %int_0
  120. // CHECK:STDOUT: %.loc6_23.2: init %empty_tuple.type = tuple_init () to %.loc6_23.1 [concrete = constants.%empty_tuple]
  121. // CHECK:STDOUT: %.loc6_23.3: init %empty_tuple.type = converted %tuple.elem0, %.loc6_23.2 [concrete = constants.%empty_tuple]
  122. // CHECK:STDOUT: %tuple.elem1: ref %empty_tuple.type = tuple_access %a.ref, element1 [concrete = constants.%tuple.elem1]
  123. // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1]
  124. // CHECK:STDOUT: %.loc6_23.4: ref %empty_tuple.type = array_index file.%b.var, %int_1
  125. // CHECK:STDOUT: %.loc6_23.5: init %empty_tuple.type = tuple_init () to %.loc6_23.4 [concrete = constants.%empty_tuple]
  126. // CHECK:STDOUT: %.loc6_23.6: init %empty_tuple.type = converted %tuple.elem1, %.loc6_23.5 [concrete = constants.%empty_tuple]
  127. // CHECK:STDOUT: %tuple.elem2: ref %empty_tuple.type = tuple_access %a.ref, element2 [concrete = constants.%tuple.elem2]
  128. // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2]
  129. // CHECK:STDOUT: %.loc6_23.7: ref %empty_tuple.type = array_index file.%b.var, %int_2
  130. // CHECK:STDOUT: %.loc6_23.8: init %empty_tuple.type = tuple_init () to %.loc6_23.7 [concrete = constants.%empty_tuple]
  131. // CHECK:STDOUT: %.loc6_23.9: init %empty_tuple.type = converted %tuple.elem2, %.loc6_23.8 [concrete = constants.%empty_tuple]
  132. // CHECK:STDOUT: %.loc6_23.10: init %array_type = array_init (%.loc6_23.3, %.loc6_23.6, %.loc6_23.9) to file.%b.var [concrete = constants.%array]
  133. // CHECK:STDOUT: %.loc6_1: init %array_type = converted %a.ref, %.loc6_23.10 [concrete = constants.%array]
  134. // CHECK:STDOUT: assign file.%b.var, %.loc6_1
  135. // CHECK:STDOUT: <elided>
  136. // CHECK:STDOUT: }
  137. // CHECK:STDOUT:
  138. // CHECK:STDOUT: --- array_in_place.carbon
  139. // CHECK:STDOUT:
  140. // CHECK:STDOUT: constants {
  141. // CHECK:STDOUT: %C: type = class_type @C [concrete]
  142. // CHECK:STDOUT: %tuple.type.ff9: type = tuple_type (type, type, type) [concrete]
  143. // CHECK:STDOUT: %tuple.type.734: type = tuple_type (%C, %C, %C) [concrete]
  144. // CHECK:STDOUT: %F.type: type = fn_type @F [concrete]
  145. // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
  146. // CHECK:STDOUT: %F: %F.type = struct_value () [concrete]
  147. // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete]
  148. // CHECK:STDOUT: %array_type: type = array_type %int_2, %tuple.type.734 [concrete]
  149. // CHECK:STDOUT: %ptr.c6b: type = ptr_type %array_type [concrete]
  150. // CHECK:STDOUT: %pattern_type.e0b: type = pattern_type %array_type [concrete]
  151. // CHECK:STDOUT: %tuple.type.14a: type = tuple_type (%tuple.type.734, %tuple.type.734) [concrete]
  152. // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete]
  153. // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete]
  154. // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete]
  155. // CHECK:STDOUT: %Op.type.bae: type = fn_type @Op.1 [concrete]
  156. // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic]
  157. // CHECK:STDOUT: %Op.type.bc9: type = fn_type @Op.2, @impl(%T) [symbolic]
  158. // CHECK:STDOUT: %Op.46f: %Op.type.bc9 = struct_value () [symbolic]
  159. // CHECK:STDOUT: %Destroy.impl_witness.66a: <witness> = impl_witness imports.%Destroy.impl_witness_table, @impl(%tuple.type.734) [concrete]
  160. // CHECK:STDOUT: %Op.type.fe9: type = fn_type @Op.2, @impl(%tuple.type.734) [concrete]
  161. // CHECK:STDOUT: %Op.ae1: %Op.type.fe9 = struct_value () [concrete]
  162. // CHECK:STDOUT: %ptr.dbe: type = ptr_type %tuple.type.734 [concrete]
  163. // CHECK:STDOUT: %Destroy.facet.829: %Destroy.type = facet_value %tuple.type.734, (%Destroy.impl_witness.66a) [concrete]
  164. // CHECK:STDOUT: %.e31: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet.829 [concrete]
  165. // CHECK:STDOUT: %Op.specific_fn.80d: <specific function> = specific_function %Op.ae1, @Op.2(%tuple.type.734) [concrete]
  166. // CHECK:STDOUT: %Destroy.impl_witness.9e1: <witness> = impl_witness imports.%Destroy.impl_witness_table, @impl(%array_type) [concrete]
  167. // CHECK:STDOUT: %Op.type.280: type = fn_type @Op.2, @impl(%array_type) [concrete]
  168. // CHECK:STDOUT: %Op.d4f: %Op.type.280 = struct_value () [concrete]
  169. // CHECK:STDOUT: %Destroy.facet.d8f: %Destroy.type = facet_value %array_type, (%Destroy.impl_witness.9e1) [concrete]
  170. // CHECK:STDOUT: %.b1e: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet.d8f [concrete]
  171. // CHECK:STDOUT: %Op.specific_fn.04c: <specific function> = specific_function %Op.d4f, @Op.2(%array_type) [concrete]
  172. // CHECK:STDOUT: }
  173. // CHECK:STDOUT:
  174. // CHECK:STDOUT: imports {
  175. // CHECK:STDOUT: %Core.import_ref.0b9: @impl.%Op.type (%Op.type.bc9) = import_ref Core//prelude/parts/destroy, loc8_29, loaded [symbolic = @impl.%Op (constants.%Op.46f)]
  176. // CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.0b9), @impl [concrete]
  177. // CHECK:STDOUT: }
  178. // CHECK:STDOUT:
  179. // CHECK:STDOUT: fn @G() {
  180. // CHECK:STDOUT: !entry:
  181. // CHECK:STDOUT: name_binding_decl {
  182. // CHECK:STDOUT: %v.patt: %pattern_type.e0b = binding_pattern v [concrete]
  183. // CHECK:STDOUT: %v.var_patt: %pattern_type.e0b = var_pattern %v.patt [concrete]
  184. // CHECK:STDOUT: }
  185. // CHECK:STDOUT: %v.var: ref %array_type = var %v.var_patt
  186. // CHECK:STDOUT: %F.ref.loc10_33: %F.type = name_ref F, file.%F.decl [concrete = constants.%F]
  187. // CHECK:STDOUT: %.loc10_41.1: ref %tuple.type.734 = splice_block %.loc10_41.2 {
  188. // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0]
  189. // CHECK:STDOUT: %.loc10_41.2: ref %tuple.type.734 = array_index %v.var, %int_0
  190. // CHECK:STDOUT: }
  191. // CHECK:STDOUT: %F.call.loc10_35: init %tuple.type.734 = call %F.ref.loc10_33() to %.loc10_41.1
  192. // CHECK:STDOUT: %F.ref.loc10_38: %F.type = name_ref F, file.%F.decl [concrete = constants.%F]
  193. // CHECK:STDOUT: %.loc10_41.3: ref %tuple.type.734 = splice_block %.loc10_41.4 {
  194. // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1]
  195. // CHECK:STDOUT: %.loc10_41.4: ref %tuple.type.734 = array_index %v.var, %int_1
  196. // CHECK:STDOUT: }
  197. // CHECK:STDOUT: %F.call.loc10_40: init %tuple.type.734 = call %F.ref.loc10_38() to %.loc10_41.3
  198. // CHECK:STDOUT: %.loc10_41.5: %tuple.type.14a = tuple_literal (%F.call.loc10_35, %F.call.loc10_40)
  199. // CHECK:STDOUT: %.loc10_41.6: init %array_type = array_init (%F.call.loc10_35, %F.call.loc10_40) to %v.var
  200. // CHECK:STDOUT: %.loc10_3: init %array_type = converted %.loc10_41.5, %.loc10_41.6
  201. // CHECK:STDOUT: assign %v.var, %.loc10_3
  202. // CHECK:STDOUT: %.loc10_28: type = splice_block %array_type [concrete = constants.%array_type] {
  203. // CHECK:STDOUT: %C.ref.loc10_17: type = name_ref C, file.%C.decl [concrete = constants.%C]
  204. // CHECK:STDOUT: %C.ref.loc10_20: type = name_ref C, file.%C.decl [concrete = constants.%C]
  205. // CHECK:STDOUT: %C.ref.loc10_23: type = name_ref C, file.%C.decl [concrete = constants.%C]
  206. // CHECK:STDOUT: %.loc10_24.1: %tuple.type.ff9 = tuple_literal (%C.ref.loc10_17, %C.ref.loc10_20, %C.ref.loc10_23)
  207. // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2]
  208. // CHECK:STDOUT: %.loc10_24.2: type = converted %.loc10_24.1, constants.%tuple.type.734 [concrete = constants.%tuple.type.734]
  209. // CHECK:STDOUT: %array_type: type = array_type %int_2, %.loc10_24.2 [concrete = constants.%array_type]
  210. // CHECK:STDOUT: }
  211. // CHECK:STDOUT: %v: ref %array_type = bind_name v, %v.var
  212. // CHECK:STDOUT: %impl.elem0.loc10_41.1: %.e31 = impl_witness_access constants.%Destroy.impl_witness.66a, element0 [concrete = constants.%Op.ae1]
  213. // CHECK:STDOUT: %bound_method.loc10_41.1: <bound method> = bound_method %.loc10_41.3, %impl.elem0.loc10_41.1
  214. // CHECK:STDOUT: %specific_fn.loc10_41.1: <specific function> = specific_function %impl.elem0.loc10_41.1, @Op.2(constants.%tuple.type.734) [concrete = constants.%Op.specific_fn.80d]
  215. // CHECK:STDOUT: %bound_method.loc10_41.2: <bound method> = bound_method %.loc10_41.3, %specific_fn.loc10_41.1
  216. // CHECK:STDOUT: %addr.loc10_41.1: %ptr.dbe = addr_of %.loc10_41.3
  217. // CHECK:STDOUT: %no_op.loc10_41.1: init %empty_tuple.type = call %bound_method.loc10_41.2(%addr.loc10_41.1)
  218. // CHECK:STDOUT: %impl.elem0.loc10_41.2: %.e31 = impl_witness_access constants.%Destroy.impl_witness.66a, element0 [concrete = constants.%Op.ae1]
  219. // CHECK:STDOUT: %bound_method.loc10_41.3: <bound method> = bound_method %.loc10_41.1, %impl.elem0.loc10_41.2
  220. // CHECK:STDOUT: %specific_fn.loc10_41.2: <specific function> = specific_function %impl.elem0.loc10_41.2, @Op.2(constants.%tuple.type.734) [concrete = constants.%Op.specific_fn.80d]
  221. // CHECK:STDOUT: %bound_method.loc10_41.4: <bound method> = bound_method %.loc10_41.1, %specific_fn.loc10_41.2
  222. // CHECK:STDOUT: %addr.loc10_41.2: %ptr.dbe = addr_of %.loc10_41.1
  223. // CHECK:STDOUT: %no_op.loc10_41.2: init %empty_tuple.type = call %bound_method.loc10_41.4(%addr.loc10_41.2)
  224. // CHECK:STDOUT: %impl.elem0.loc10_3: %.b1e = impl_witness_access constants.%Destroy.impl_witness.9e1, element0 [concrete = constants.%Op.d4f]
  225. // CHECK:STDOUT: %bound_method.loc10_3.1: <bound method> = bound_method %v.var, %impl.elem0.loc10_3
  226. // CHECK:STDOUT: %specific_fn.loc10_3: <specific function> = specific_function %impl.elem0.loc10_3, @Op.2(constants.%array_type) [concrete = constants.%Op.specific_fn.04c]
  227. // CHECK:STDOUT: %bound_method.loc10_3.2: <bound method> = bound_method %v.var, %specific_fn.loc10_3
  228. // CHECK:STDOUT: %addr.loc10_3: %ptr.c6b = addr_of %v.var
  229. // CHECK:STDOUT: %no_op.loc10_3: init %empty_tuple.type = call %bound_method.loc10_3.2(%addr.loc10_3)
  230. // CHECK:STDOUT: <elided>
  231. // CHECK:STDOUT: }
  232. // CHECK:STDOUT:
  233. // CHECK:STDOUT: --- array_vs_tuple.carbon
  234. // CHECK:STDOUT:
  235. // CHECK:STDOUT: constants {
  236. // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
  237. // CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [concrete]
  238. // CHECK:STDOUT: %array_type: type = array_type %int_3, %empty_tuple.type [concrete]
  239. // CHECK:STDOUT: %ptr.20b: type = ptr_type %array_type [concrete]
  240. // CHECK:STDOUT: %pattern_type.035: type = pattern_type %array_type [concrete]
  241. // CHECK:STDOUT: %tuple.type: type = tuple_type (%empty_tuple.type, %empty_tuple.type, %empty_tuple.type) [concrete]
  242. // CHECK:STDOUT: %ptr.7fe: type = ptr_type %tuple.type [concrete]
  243. // CHECK:STDOUT: %pattern_type.8c1: type = pattern_type %tuple.type [concrete]
  244. // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete]
  245. // CHECK:STDOUT: %Op.type.bae: type = fn_type @Op.1 [concrete]
  246. // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic]
  247. // CHECK:STDOUT: %Op.type.bc9: type = fn_type @Op.2, @impl(%T) [symbolic]
  248. // CHECK:STDOUT: %Op.46f: %Op.type.bc9 = struct_value () [symbolic]
  249. // CHECK:STDOUT: %Destroy.impl_witness.5b3: <witness> = impl_witness imports.%Destroy.impl_witness_table, @impl(%tuple.type) [concrete]
  250. // CHECK:STDOUT: %Op.type.073: type = fn_type @Op.2, @impl(%tuple.type) [concrete]
  251. // CHECK:STDOUT: %Op.dce: %Op.type.073 = struct_value () [concrete]
  252. // CHECK:STDOUT: %Destroy.facet.d28: %Destroy.type = facet_value %tuple.type, (%Destroy.impl_witness.5b3) [concrete]
  253. // CHECK:STDOUT: %.886: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet.d28 [concrete]
  254. // CHECK:STDOUT: %Op.specific_fn.234: <specific function> = specific_function %Op.dce, @Op.2(%tuple.type) [concrete]
  255. // CHECK:STDOUT: %Destroy.impl_witness.287: <witness> = impl_witness imports.%Destroy.impl_witness_table, @impl(%array_type) [concrete]
  256. // CHECK:STDOUT: %Op.type.c60: type = fn_type @Op.2, @impl(%array_type) [concrete]
  257. // CHECK:STDOUT: %Op.f81: %Op.type.c60 = struct_value () [concrete]
  258. // CHECK:STDOUT: %Destroy.facet.409: %Destroy.type = facet_value %array_type, (%Destroy.impl_witness.287) [concrete]
  259. // CHECK:STDOUT: %.b3c: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet.409 [concrete]
  260. // CHECK:STDOUT: %Op.specific_fn.29c: <specific function> = specific_function %Op.f81, @Op.2(%array_type) [concrete]
  261. // CHECK:STDOUT: }
  262. // CHECK:STDOUT:
  263. // CHECK:STDOUT: imports {
  264. // CHECK:STDOUT: %Core.import_ref.0b9: @impl.%Op.type (%Op.type.bc9) = import_ref Core//prelude/parts/destroy, loc8_29, loaded [symbolic = @impl.%Op (constants.%Op.46f)]
  265. // CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.0b9), @impl [concrete]
  266. // CHECK:STDOUT: }
  267. // CHECK:STDOUT:
  268. // CHECK:STDOUT: fn @G() {
  269. // CHECK:STDOUT: !entry:
  270. // CHECK:STDOUT: name_binding_decl {
  271. // CHECK:STDOUT: %a.patt: %pattern_type.035 = binding_pattern a [concrete]
  272. // CHECK:STDOUT: %a.var_patt: %pattern_type.035 = var_pattern %a.patt [concrete]
  273. // CHECK:STDOUT: }
  274. // CHECK:STDOUT: %a.var: ref %array_type = var %a.var_patt
  275. // CHECK:STDOUT: %.loc7_21: type = splice_block %array_type [concrete = constants.%array_type] {
  276. // CHECK:STDOUT: %.loc7_17.1: %empty_tuple.type = tuple_literal ()
  277. // CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [concrete = constants.%int_3]
  278. // CHECK:STDOUT: %.loc7_17.2: type = converted %.loc7_17.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type]
  279. // CHECK:STDOUT: %array_type: type = array_type %int_3, %.loc7_17.2 [concrete = constants.%array_type]
  280. // CHECK:STDOUT: }
  281. // CHECK:STDOUT: %a: ref %array_type = bind_name a, %a.var
  282. // CHECK:STDOUT: name_binding_decl {
  283. // CHECK:STDOUT: %b.patt: %pattern_type.8c1 = binding_pattern b [concrete]
  284. // CHECK:STDOUT: %b.var_patt: %pattern_type.8c1 = var_pattern %b.patt [concrete]
  285. // CHECK:STDOUT: }
  286. // CHECK:STDOUT: %b.var: ref %tuple.type = var %b.var_patt
  287. // CHECK:STDOUT: %.loc8_21.1: type = splice_block %.loc8_21.6 [concrete = constants.%tuple.type] {
  288. // CHECK:STDOUT: %.loc8_12: %empty_tuple.type = tuple_literal ()
  289. // CHECK:STDOUT: %.loc8_16: %empty_tuple.type = tuple_literal ()
  290. // CHECK:STDOUT: %.loc8_20: %empty_tuple.type = tuple_literal ()
  291. // CHECK:STDOUT: %.loc8_21.2: %tuple.type = tuple_literal (%.loc8_12, %.loc8_16, %.loc8_20)
  292. // CHECK:STDOUT: %.loc8_21.3: type = converted %.loc8_12, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type]
  293. // CHECK:STDOUT: %.loc8_21.4: type = converted %.loc8_16, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type]
  294. // CHECK:STDOUT: %.loc8_21.5: type = converted %.loc8_20, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type]
  295. // CHECK:STDOUT: %.loc8_21.6: type = converted %.loc8_21.2, constants.%tuple.type [concrete = constants.%tuple.type]
  296. // CHECK:STDOUT: }
  297. // CHECK:STDOUT: %b: ref %tuple.type = bind_name b, %b.var
  298. // CHECK:STDOUT: %impl.elem0.loc8: %.886 = impl_witness_access constants.%Destroy.impl_witness.5b3, element0 [concrete = constants.%Op.dce]
  299. // CHECK:STDOUT: %bound_method.loc8_3.1: <bound method> = bound_method %b.var, %impl.elem0.loc8
  300. // CHECK:STDOUT: %specific_fn.loc8: <specific function> = specific_function %impl.elem0.loc8, @Op.2(constants.%tuple.type) [concrete = constants.%Op.specific_fn.234]
  301. // CHECK:STDOUT: %bound_method.loc8_3.2: <bound method> = bound_method %b.var, %specific_fn.loc8
  302. // CHECK:STDOUT: %addr.loc8: %ptr.7fe = addr_of %b.var
  303. // CHECK:STDOUT: %no_op.loc8: init %empty_tuple.type = call %bound_method.loc8_3.2(%addr.loc8)
  304. // CHECK:STDOUT: %impl.elem0.loc7: %.b3c = impl_witness_access constants.%Destroy.impl_witness.287, element0 [concrete = constants.%Op.f81]
  305. // CHECK:STDOUT: %bound_method.loc7_3.1: <bound method> = bound_method %a.var, %impl.elem0.loc7
  306. // CHECK:STDOUT: %specific_fn.loc7: <specific function> = specific_function %impl.elem0.loc7, @Op.2(constants.%array_type) [concrete = constants.%Op.specific_fn.29c]
  307. // CHECK:STDOUT: %bound_method.loc7_3.2: <bound method> = bound_method %a.var, %specific_fn.loc7
  308. // CHECK:STDOUT: %addr.loc7: %ptr.20b = addr_of %a.var
  309. // CHECK:STDOUT: %no_op.loc7: init %empty_tuple.type = call %bound_method.loc7_3.2(%addr.loc7)
  310. // CHECK:STDOUT: <elided>
  311. // CHECK:STDOUT: }
  312. // CHECK:STDOUT:
  313. // CHECK:STDOUT: --- assign_return_value.carbon
  314. // CHECK:STDOUT:
  315. // CHECK:STDOUT: constants {
  316. // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
  317. // CHECK:STDOUT: %tuple.type: type = tuple_type (%empty_tuple.type) [concrete]
  318. // CHECK:STDOUT: %F.type: type = fn_type @F [concrete]
  319. // CHECK:STDOUT: %F: %F.type = struct_value () [concrete]
  320. // CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [concrete]
  321. // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete]
  322. // CHECK:STDOUT: %array_type: type = array_type %int_1, %empty_tuple.type [concrete]
  323. // CHECK:STDOUT: %ptr.b99: type = ptr_type %array_type [concrete]
  324. // CHECK:STDOUT: %pattern_type.fe8: type = pattern_type %array_type [concrete]
  325. // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete]
  326. // CHECK:STDOUT: %array: %array_type = tuple_value (%empty_tuple) [concrete]
  327. // CHECK:STDOUT: %Destroy.type: type = facet_type <@Destroy> [concrete]
  328. // CHECK:STDOUT: %Op.type.bae: type = fn_type @Op.1 [concrete]
  329. // CHECK:STDOUT: %T: type = bind_symbolic_name T, 0 [symbolic]
  330. // CHECK:STDOUT: %Op.type.bc9: type = fn_type @Op.2, @impl(%T) [symbolic]
  331. // CHECK:STDOUT: %Op.46f: %Op.type.bc9 = struct_value () [symbolic]
  332. // CHECK:STDOUT: %Destroy.impl_witness.511: <witness> = impl_witness imports.%Destroy.impl_witness_table, @impl(%tuple.type) [concrete]
  333. // CHECK:STDOUT: %Op.type.23e: type = fn_type @Op.2, @impl(%tuple.type) [concrete]
  334. // CHECK:STDOUT: %Op.f19: %Op.type.23e = struct_value () [concrete]
  335. // CHECK:STDOUT: %ptr.652: type = ptr_type %tuple.type [concrete]
  336. // CHECK:STDOUT: %Destroy.facet.108: %Destroy.type = facet_value %tuple.type, (%Destroy.impl_witness.511) [concrete]
  337. // CHECK:STDOUT: %.2cd: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet.108 [concrete]
  338. // CHECK:STDOUT: %Op.specific_fn.d2b: <specific function> = specific_function %Op.f19, @Op.2(%tuple.type) [concrete]
  339. // CHECK:STDOUT: %Destroy.impl_witness.740: <witness> = impl_witness imports.%Destroy.impl_witness_table, @impl(%array_type) [concrete]
  340. // CHECK:STDOUT: %Op.type.471: type = fn_type @Op.2, @impl(%array_type) [concrete]
  341. // CHECK:STDOUT: %Op.688: %Op.type.471 = struct_value () [concrete]
  342. // CHECK:STDOUT: %Destroy.facet.682: %Destroy.type = facet_value %array_type, (%Destroy.impl_witness.740) [concrete]
  343. // CHECK:STDOUT: %.0ab: type = fn_type_with_self_type %Op.type.bae, %Destroy.facet.682 [concrete]
  344. // CHECK:STDOUT: %Op.specific_fn.cae: <specific function> = specific_function %Op.688, @Op.2(%array_type) [concrete]
  345. // CHECK:STDOUT: }
  346. // CHECK:STDOUT:
  347. // CHECK:STDOUT: imports {
  348. // CHECK:STDOUT: %Core.import_ref.0b9: @impl.%Op.type (%Op.type.bc9) = import_ref Core//prelude/parts/destroy, loc8_29, loaded [symbolic = @impl.%Op (constants.%Op.46f)]
  349. // CHECK:STDOUT: %Destroy.impl_witness_table = impl_witness_table (%Core.import_ref.0b9), @impl [concrete]
  350. // CHECK:STDOUT: }
  351. // CHECK:STDOUT:
  352. // CHECK:STDOUT: fn @Run() {
  353. // CHECK:STDOUT: !entry:
  354. // CHECK:STDOUT: name_binding_decl {
  355. // CHECK:STDOUT: %t.patt: %pattern_type.fe8 = binding_pattern t [concrete]
  356. // CHECK:STDOUT: %t.var_patt: %pattern_type.fe8 = var_pattern %t.patt [concrete]
  357. // CHECK:STDOUT: }
  358. // CHECK:STDOUT: %t.var: ref %array_type = var %t.var_patt
  359. // CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [concrete = constants.%F]
  360. // CHECK:STDOUT: %F.call: init %tuple.type = call %F.ref()
  361. // CHECK:STDOUT: %.loc8_27.1: ref %tuple.type = temporary_storage
  362. // CHECK:STDOUT: %.loc8_27.2: ref %tuple.type = temporary %.loc8_27.1, %F.call
  363. // CHECK:STDOUT: %tuple.elem0: ref %empty_tuple.type = tuple_access %.loc8_27.2, element0
  364. // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0]
  365. // CHECK:STDOUT: %.loc8_27.3: ref %empty_tuple.type = array_index %t.var, %int_0
  366. // CHECK:STDOUT: %.loc8_27.4: init %empty_tuple.type = tuple_init () to %.loc8_27.3 [concrete = constants.%empty_tuple]
  367. // CHECK:STDOUT: %.loc8_27.5: init %empty_tuple.type = converted %tuple.elem0, %.loc8_27.4 [concrete = constants.%empty_tuple]
  368. // CHECK:STDOUT: %.loc8_27.6: init %array_type = array_init (%.loc8_27.5) to %t.var [concrete = constants.%array]
  369. // CHECK:STDOUT: %.loc8_3: init %array_type = converted %F.call, %.loc8_27.6 [concrete = constants.%array]
  370. // CHECK:STDOUT: assign %t.var, %.loc8_3
  371. // CHECK:STDOUT: %.loc8_21: type = splice_block %array_type [concrete = constants.%array_type] {
  372. // CHECK:STDOUT: %.loc8_17.1: %empty_tuple.type = tuple_literal ()
  373. // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1]
  374. // CHECK:STDOUT: %.loc8_17.2: type = converted %.loc8_17.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type]
  375. // CHECK:STDOUT: %array_type: type = array_type %int_1, %.loc8_17.2 [concrete = constants.%array_type]
  376. // CHECK:STDOUT: }
  377. // CHECK:STDOUT: %t: ref %array_type = bind_name t, %t.var
  378. // CHECK:STDOUT: %impl.elem0.loc8_27: %.2cd = impl_witness_access constants.%Destroy.impl_witness.511, element0 [concrete = constants.%Op.f19]
  379. // CHECK:STDOUT: %bound_method.loc8_27.1: <bound method> = bound_method %.loc8_27.1, %impl.elem0.loc8_27
  380. // CHECK:STDOUT: %specific_fn.loc8_27: <specific function> = specific_function %impl.elem0.loc8_27, @Op.2(constants.%tuple.type) [concrete = constants.%Op.specific_fn.d2b]
  381. // CHECK:STDOUT: %bound_method.loc8_27.2: <bound method> = bound_method %.loc8_27.1, %specific_fn.loc8_27
  382. // CHECK:STDOUT: %addr.loc8_27: %ptr.652 = addr_of %.loc8_27.1
  383. // CHECK:STDOUT: %no_op.loc8_27: init %empty_tuple.type = call %bound_method.loc8_27.2(%addr.loc8_27)
  384. // CHECK:STDOUT: %impl.elem0.loc8_3: %.0ab = impl_witness_access constants.%Destroy.impl_witness.740, element0 [concrete = constants.%Op.688]
  385. // CHECK:STDOUT: %bound_method.loc8_3.1: <bound method> = bound_method %t.var, %impl.elem0.loc8_3
  386. // CHECK:STDOUT: %specific_fn.loc8_3: <specific function> = specific_function %impl.elem0.loc8_3, @Op.2(constants.%array_type) [concrete = constants.%Op.specific_fn.cae]
  387. // CHECK:STDOUT: %bound_method.loc8_3.2: <bound method> = bound_method %t.var, %specific_fn.loc8_3
  388. // CHECK:STDOUT: %addr.loc8_3: %ptr.b99 = addr_of %t.var
  389. // CHECK:STDOUT: %no_op.loc8_3: init %empty_tuple.type = call %bound_method.loc8_3.2(%addr.loc8_3)
  390. // CHECK:STDOUT: <elided>
  391. // CHECK:STDOUT: }
  392. // CHECK:STDOUT:
  393. // CHECK:STDOUT: --- nine_elements.carbon
  394. // CHECK:STDOUT:
  395. // CHECK:STDOUT: constants {
  396. // CHECK:STDOUT: %empty_tuple.type: type = tuple_type () [concrete]
  397. // CHECK:STDOUT: %tuple.type: type = tuple_type (%empty_tuple.type, %empty_tuple.type, %empty_tuple.type, %empty_tuple.type, %empty_tuple.type, %empty_tuple.type, %empty_tuple.type, %empty_tuple.type, %empty_tuple.type) [concrete]
  398. // CHECK:STDOUT: %tuple.elem0: ref %empty_tuple.type = tuple_access file.%a.var, element0 [concrete]
  399. // CHECK:STDOUT: %empty_tuple: %empty_tuple.type = tuple_value () [concrete]
  400. // CHECK:STDOUT: %tuple.elem1: ref %empty_tuple.type = tuple_access file.%a.var, element1 [concrete]
  401. // CHECK:STDOUT: %tuple.elem2: ref %empty_tuple.type = tuple_access file.%a.var, element2 [concrete]
  402. // CHECK:STDOUT: %tuple.elem3: ref %empty_tuple.type = tuple_access file.%a.var, element3 [concrete]
  403. // CHECK:STDOUT: %tuple.elem4: ref %empty_tuple.type = tuple_access file.%a.var, element4 [concrete]
  404. // CHECK:STDOUT: %tuple.elem5: ref %empty_tuple.type = tuple_access file.%a.var, element5 [concrete]
  405. // CHECK:STDOUT: %tuple.elem6: ref %empty_tuple.type = tuple_access file.%a.var, element6 [concrete]
  406. // CHECK:STDOUT: %tuple.elem7: ref %empty_tuple.type = tuple_access file.%a.var, element7 [concrete]
  407. // CHECK:STDOUT: %tuple.elem8: ref %empty_tuple.type = tuple_access file.%a.var, element8 [concrete]
  408. // CHECK:STDOUT: %int_9: Core.IntLiteral = int_value 9 [concrete]
  409. // CHECK:STDOUT: %array_type: type = array_type %int_9, %empty_tuple.type [concrete]
  410. // CHECK:STDOUT: %pattern_type.3db: type = pattern_type %array_type [concrete]
  411. // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete]
  412. // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete]
  413. // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete]
  414. // CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [concrete]
  415. // CHECK:STDOUT: %int_4: Core.IntLiteral = int_value 4 [concrete]
  416. // CHECK:STDOUT: %int_5: Core.IntLiteral = int_value 5 [concrete]
  417. // CHECK:STDOUT: %int_6: Core.IntLiteral = int_value 6 [concrete]
  418. // CHECK:STDOUT: %int_7: Core.IntLiteral = int_value 7 [concrete]
  419. // CHECK:STDOUT: %int_8: Core.IntLiteral = int_value 8 [concrete]
  420. // CHECK:STDOUT: %array: %array_type = tuple_value (%empty_tuple, %empty_tuple, %empty_tuple, %empty_tuple, %empty_tuple, %empty_tuple, %empty_tuple, %empty_tuple, %empty_tuple) [concrete]
  421. // CHECK:STDOUT: }
  422. // CHECK:STDOUT:
  423. // CHECK:STDOUT: imports {
  424. // CHECK:STDOUT: }
  425. // CHECK:STDOUT:
  426. // CHECK:STDOUT: file {
  427. // CHECK:STDOUT: name_binding_decl {
  428. // CHECK:STDOUT: %b.patt: %pattern_type.3db = binding_pattern b [concrete]
  429. // CHECK:STDOUT: %b.var_patt: %pattern_type.3db = var_pattern %b.patt [concrete]
  430. // CHECK:STDOUT: }
  431. // CHECK:STDOUT: %b.var: ref %array_type = var %b.var_patt [concrete]
  432. // CHECK:STDOUT: %.loc9_19: type = splice_block %array_type [concrete = constants.%array_type] {
  433. // CHECK:STDOUT: %.loc9_15.1: %empty_tuple.type = tuple_literal ()
  434. // CHECK:STDOUT: %int_9: Core.IntLiteral = int_value 9 [concrete = constants.%int_9]
  435. // CHECK:STDOUT: %.loc9_15.2: type = converted %.loc9_15.1, constants.%empty_tuple.type [concrete = constants.%empty_tuple.type]
  436. // CHECK:STDOUT: %array_type: type = array_type %int_9, %.loc9_15.2 [concrete = constants.%array_type]
  437. // CHECK:STDOUT: }
  438. // CHECK:STDOUT: %b: ref %array_type = bind_name b, %b.var [concrete = %b.var]
  439. // CHECK:STDOUT: }
  440. // CHECK:STDOUT:
  441. // CHECK:STDOUT: fn @__global_init() {
  442. // CHECK:STDOUT: !entry:
  443. // CHECK:STDOUT: <elided>
  444. // CHECK:STDOUT: %a.ref: ref %tuple.type = name_ref a, file.%a [concrete = file.%a.var]
  445. // CHECK:STDOUT: %tuple.elem0.loc9: ref %empty_tuple.type = tuple_access %a.ref, element0 [concrete = constants.%tuple.elem0]
  446. // CHECK:STDOUT: %int_0: Core.IntLiteral = int_value 0 [concrete = constants.%int_0]
  447. // CHECK:STDOUT: %.loc9_23.1: ref %empty_tuple.type = array_index file.%b.var, %int_0
  448. // CHECK:STDOUT: %.loc9_23.2: init %empty_tuple.type = tuple_init () to %.loc9_23.1 [concrete = constants.%empty_tuple]
  449. // CHECK:STDOUT: %.loc9_23.3: init %empty_tuple.type = converted %tuple.elem0.loc9, %.loc9_23.2 [concrete = constants.%empty_tuple]
  450. // CHECK:STDOUT: %tuple.elem1.loc9: ref %empty_tuple.type = tuple_access %a.ref, element1 [concrete = constants.%tuple.elem1]
  451. // CHECK:STDOUT: %int_1: Core.IntLiteral = int_value 1 [concrete = constants.%int_1]
  452. // CHECK:STDOUT: %.loc9_23.4: ref %empty_tuple.type = array_index file.%b.var, %int_1
  453. // CHECK:STDOUT: %.loc9_23.5: init %empty_tuple.type = tuple_init () to %.loc9_23.4 [concrete = constants.%empty_tuple]
  454. // CHECK:STDOUT: %.loc9_23.6: init %empty_tuple.type = converted %tuple.elem1.loc9, %.loc9_23.5 [concrete = constants.%empty_tuple]
  455. // CHECK:STDOUT: %tuple.elem2.loc9: ref %empty_tuple.type = tuple_access %a.ref, element2 [concrete = constants.%tuple.elem2]
  456. // CHECK:STDOUT: %int_2: Core.IntLiteral = int_value 2 [concrete = constants.%int_2]
  457. // CHECK:STDOUT: %.loc9_23.7: ref %empty_tuple.type = array_index file.%b.var, %int_2
  458. // CHECK:STDOUT: %.loc9_23.8: init %empty_tuple.type = tuple_init () to %.loc9_23.7 [concrete = constants.%empty_tuple]
  459. // CHECK:STDOUT: %.loc9_23.9: init %empty_tuple.type = converted %tuple.elem2.loc9, %.loc9_23.8 [concrete = constants.%empty_tuple]
  460. // CHECK:STDOUT: %tuple.elem3.loc9: ref %empty_tuple.type = tuple_access %a.ref, element3 [concrete = constants.%tuple.elem3]
  461. // CHECK:STDOUT: %int_3: Core.IntLiteral = int_value 3 [concrete = constants.%int_3]
  462. // CHECK:STDOUT: %.loc9_23.10: ref %empty_tuple.type = array_index file.%b.var, %int_3
  463. // CHECK:STDOUT: %.loc9_23.11: init %empty_tuple.type = tuple_init () to %.loc9_23.10 [concrete = constants.%empty_tuple]
  464. // CHECK:STDOUT: %.loc9_23.12: init %empty_tuple.type = converted %tuple.elem3.loc9, %.loc9_23.11 [concrete = constants.%empty_tuple]
  465. // CHECK:STDOUT: %tuple.elem4.loc9: ref %empty_tuple.type = tuple_access %a.ref, element4 [concrete = constants.%tuple.elem4]
  466. // CHECK:STDOUT: %int_4: Core.IntLiteral = int_value 4 [concrete = constants.%int_4]
  467. // CHECK:STDOUT: %.loc9_23.13: ref %empty_tuple.type = array_index file.%b.var, %int_4
  468. // CHECK:STDOUT: %.loc9_23.14: init %empty_tuple.type = tuple_init () to %.loc9_23.13 [concrete = constants.%empty_tuple]
  469. // CHECK:STDOUT: %.loc9_23.15: init %empty_tuple.type = converted %tuple.elem4.loc9, %.loc9_23.14 [concrete = constants.%empty_tuple]
  470. // CHECK:STDOUT: %tuple.elem5.loc9: ref %empty_tuple.type = tuple_access %a.ref, element5 [concrete = constants.%tuple.elem5]
  471. // CHECK:STDOUT: %int_5: Core.IntLiteral = int_value 5 [concrete = constants.%int_5]
  472. // CHECK:STDOUT: %.loc9_23.16: ref %empty_tuple.type = array_index file.%b.var, %int_5
  473. // CHECK:STDOUT: %.loc9_23.17: init %empty_tuple.type = tuple_init () to %.loc9_23.16 [concrete = constants.%empty_tuple]
  474. // CHECK:STDOUT: %.loc9_23.18: init %empty_tuple.type = converted %tuple.elem5.loc9, %.loc9_23.17 [concrete = constants.%empty_tuple]
  475. // CHECK:STDOUT: %tuple.elem6.loc9: ref %empty_tuple.type = tuple_access %a.ref, element6 [concrete = constants.%tuple.elem6]
  476. // CHECK:STDOUT: %int_6: Core.IntLiteral = int_value 6 [concrete = constants.%int_6]
  477. // CHECK:STDOUT: %.loc9_23.19: ref %empty_tuple.type = array_index file.%b.var, %int_6
  478. // CHECK:STDOUT: %.loc9_23.20: init %empty_tuple.type = tuple_init () to %.loc9_23.19 [concrete = constants.%empty_tuple]
  479. // CHECK:STDOUT: %.loc9_23.21: init %empty_tuple.type = converted %tuple.elem6.loc9, %.loc9_23.20 [concrete = constants.%empty_tuple]
  480. // CHECK:STDOUT: %tuple.elem7.loc9: ref %empty_tuple.type = tuple_access %a.ref, element7 [concrete = constants.%tuple.elem7]
  481. // CHECK:STDOUT: %int_7: Core.IntLiteral = int_value 7 [concrete = constants.%int_7]
  482. // CHECK:STDOUT: %.loc9_23.22: ref %empty_tuple.type = array_index file.%b.var, %int_7
  483. // CHECK:STDOUT: %.loc9_23.23: init %empty_tuple.type = tuple_init () to %.loc9_23.22 [concrete = constants.%empty_tuple]
  484. // CHECK:STDOUT: %.loc9_23.24: init %empty_tuple.type = converted %tuple.elem7.loc9, %.loc9_23.23 [concrete = constants.%empty_tuple]
  485. // CHECK:STDOUT: %tuple.elem8.loc9: ref %empty_tuple.type = tuple_access %a.ref, element8 [concrete = constants.%tuple.elem8]
  486. // CHECK:STDOUT: %int_8: Core.IntLiteral = int_value 8 [concrete = constants.%int_8]
  487. // CHECK:STDOUT: %.loc9_23.25: ref %empty_tuple.type = array_index file.%b.var, %int_8
  488. // CHECK:STDOUT: %.loc9_23.26: init %empty_tuple.type = tuple_init () to %.loc9_23.25 [concrete = constants.%empty_tuple]
  489. // CHECK:STDOUT: %.loc9_23.27: init %empty_tuple.type = converted %tuple.elem8.loc9, %.loc9_23.26 [concrete = constants.%empty_tuple]
  490. // CHECK:STDOUT: %.loc9_23.28: init %array_type = array_init (%.loc9_23.3, %.loc9_23.6, %.loc9_23.9, %.loc9_23.12, %.loc9_23.15, %.loc9_23.18, %.loc9_23.21, %.loc9_23.24, %.loc9_23.27) to file.%b.var [concrete = constants.%array]
  491. // CHECK:STDOUT: %.loc9_1: init %array_type = converted %a.ref, %.loc9_23.28 [concrete = constants.%array]
  492. // CHECK:STDOUT: assign file.%b.var, %.loc9_1
  493. // CHECK:STDOUT: <elided>
  494. // CHECK:STDOUT: }
  495. // CHECK:STDOUT: