cpp_interop.carbon 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363
  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/none.carbon
  6. // EXTRA-ARGS: --dump-raw-sem-ir --builtin-sem-ir
  7. //
  8. // AUTOUPDATE
  9. // TIP: To test this file alone, run:
  10. // TIP: bazel test //toolchain/testing:file_test --test_arg=--file_tests=toolchain/check/testdata/basics/raw_sem_ir/cpp_interop.carbon
  11. // TIP: To dump output, run:
  12. // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/basics/raw_sem_ir/cpp_interop.carbon
  13. // --- header.h
  14. struct X {
  15. X* _Nonnull p;
  16. };
  17. void f(X x = {}) {
  18. }
  19. X* _Nonnull global;
  20. // --- import.carbon
  21. import Cpp library "header.h";
  22. fn G(x: Cpp.X) {
  23. Cpp.f();
  24. Cpp.f(x);
  25. Cpp.f(*Cpp.global);
  26. }
  27. // CHECK:STDOUT: ---
  28. // CHECK:STDOUT: filename: import.carbon
  29. // CHECK:STDOUT: sem_ir:
  30. // CHECK:STDOUT: import_irs:
  31. // CHECK:STDOUT: 'import_ir(ApiForImpl)': {decl_id: inst<none>, is_export: false}
  32. // CHECK:STDOUT: 'import_ir(Cpp)': {decl_id: inst<none>, is_export: false}
  33. // CHECK:STDOUT: import_ir_insts:
  34. // CHECK:STDOUT: import_ir_inst0: {ir_id: import_ir(Cpp), clang_source_loc_id: clang_source_loc60000000}
  35. // CHECK:STDOUT: import_ir_inst1: {ir_id: import_ir(Cpp), clang_source_loc_id: clang_source_loc60000001}
  36. // CHECK:STDOUT: import_ir_inst2: {ir_id: import_ir(Cpp), clang_source_loc_id: clang_source_loc60000002}
  37. // CHECK:STDOUT: clang_decls:
  38. // CHECK:STDOUT: clang_decl_id60000000: {key: "<translation unit>", inst_id: inst60000010}
  39. // CHECK:STDOUT: clang_decl_id60000001: {key: "struct X {}", inst_id: inst60000013}
  40. // CHECK:STDOUT: clang_decl_id60000002: {key: "X * _Nonnull p", inst_id: inst60000021}
  41. // CHECK:STDOUT: clang_decl_id60000003: {key: {decl: "void f(X x = {})", num_params: 0}, inst_id: inst6000002C}
  42. // CHECK:STDOUT: clang_decl_id60000004: {key: {decl: "extern void f__carbon_thunk()", num_params: 0}, inst_id: inst6000002F}
  43. // CHECK:STDOUT: clang_decl_id60000005: {key: {decl: "void f(X x = {})", num_params: 1}, inst_id: inst6000003A}
  44. // CHECK:STDOUT: clang_decl_id60000006: {key: {decl: "extern void f__carbon_thunk(X * _Nonnull x)", num_params: 1}, inst_id: inst60000042}
  45. // CHECK:STDOUT: clang_decl_id60000007: {key: "X * _Nonnull global", inst_id: inst6000004B}
  46. // CHECK:STDOUT: name_scopes:
  47. // CHECK:STDOUT: name_scope0: {inst: instE, parent_scope: name_scope<none>, has_error: false, extended_scopes: [], names: {name(Cpp): inst60000010, name0: inst6000001C}}
  48. // CHECK:STDOUT: name_scope60000001: {inst: inst60000010, parent_scope: name_scope0, has_error: false, extended_scopes: [], names: {name2: inst60000013, name3: inst60000029, name4: inst6000004B}}
  49. // CHECK:STDOUT: name_scope60000002: {inst: inst60000013, parent_scope: name_scope60000001, has_error: false, extended_scopes: [], names: {}}
  50. // CHECK:STDOUT: entity_names:
  51. // CHECK:STDOUT: entity_name60000000: {name: name1, parent_scope: name_scope<none>, index: -1, is_template: 0}
  52. // CHECK:STDOUT: entity_name60000001: {name: name1, parent_scope: name_scope<none>, index: -1, is_template: 0}
  53. // CHECK:STDOUT: entity_name60000002: {name: name1, parent_scope: name_scope<none>, index: -1, is_template: 0}
  54. // CHECK:STDOUT: entity_name60000003: {name: name4, parent_scope: name_scope60000001, index: -1, is_template: 0}
  55. // CHECK:STDOUT: cpp_global_vars:
  56. // CHECK:STDOUT: cpp_global_var60000000: {key: {entity_name_id: entity_name60000003}, clang_decl_id: clang_decl_id60000007}
  57. // CHECK:STDOUT: functions:
  58. // CHECK:STDOUT: function60000000: {name: name0, parent_scope: name_scope0, call_params_id: inst_block60000006, body: [inst_block60000009]}
  59. // CHECK:STDOUT: function60000001: {name: name3, parent_scope: name_scope60000001, call_params_id: inst_block_empty}
  60. // CHECK:STDOUT: function60000002: {name: name6, parent_scope: name_scope60000001, call_params_id: inst_block_empty}
  61. // CHECK:STDOUT: function60000003: {name: name3, parent_scope: name_scope60000001, call_params_id: inst_block6000000D}
  62. // CHECK:STDOUT: function60000004: {name: name6, parent_scope: name_scope60000001, call_params_id: inst_block60000012}
  63. // CHECK:STDOUT: classes:
  64. // CHECK:STDOUT: class60000000: {name: name2, parent_scope: name_scope60000001, self_type_id: type(inst60000014), inheritance_kind: Base, is_dynamic: 0, scope_id: name_scope60000002, body_block_id: inst_block6000000A, adapt_id: inst<none>, base_id: inst<none>, complete_type_witness_id: inst60000024, vtable_decl_id: inst<none>}}
  65. // CHECK:STDOUT: generics: {}
  66. // CHECK:STDOUT: specifics: {}
  67. // CHECK:STDOUT: struct_type_fields:
  68. // CHECK:STDOUT: struct_type_fields0: {}
  69. // CHECK:STDOUT: struct_type_fields60000001:
  70. // CHECK:STDOUT: 0: {name_id: name5, type_inst_id: inst6000001F}
  71. // CHECK:STDOUT: struct_type_fields60000002:
  72. // CHECK:STDOUT: 0: {name_id: name5, type_inst_id: inst6000001F}
  73. // CHECK:STDOUT: types:
  74. // CHECK:STDOUT: 'type(TypeType)':
  75. // CHECK:STDOUT: value_repr: {kind: copy, type: type(TypeType)}
  76. // CHECK:STDOUT: 'type(Error)':
  77. // CHECK:STDOUT: value_repr: {kind: copy, type: type(Error)}
  78. // CHECK:STDOUT: 'type(inst(NamespaceType))':
  79. // CHECK:STDOUT: value_repr: {kind: copy, type: type(inst(NamespaceType))}
  80. // CHECK:STDOUT: 'type(inst(InstType))':
  81. // CHECK:STDOUT: value_repr: {kind: none, type: type(inst60000012)}
  82. // CHECK:STDOUT: 'type(inst60000012)':
  83. // CHECK:STDOUT: value_repr: {kind: none, type: type(inst60000012)}
  84. // CHECK:STDOUT: 'type(inst6000001D)':
  85. // CHECK:STDOUT: value_repr: {kind: none, type: type(inst60000012)}
  86. // CHECK:STDOUT: 'type(inst6000001F)':
  87. // CHECK:STDOUT: value_repr: {kind: copy, type: type(inst6000001F)}
  88. // CHECK:STDOUT: 'type(inst(WitnessType))':
  89. // CHECK:STDOUT: value_repr: {kind: copy, type: type(inst(WitnessType))}
  90. // CHECK:STDOUT: 'type(inst60000026)':
  91. // CHECK:STDOUT: value_repr: {kind: copy, type: type(inst60000026)}
  92. // CHECK:STDOUT: 'type(inst60000023)':
  93. // CHECK:STDOUT: value_repr: {kind: pointer, type: type(inst60000026)}
  94. // CHECK:STDOUT: 'type(inst60000014)':
  95. // CHECK:STDOUT: value_repr: {kind: pointer, type: type(inst60000026)}
  96. // CHECK:STDOUT: 'type(inst60000028)':
  97. // CHECK:STDOUT: value_repr: {kind: none, type: type(inst60000012)}
  98. // CHECK:STDOUT: 'type(inst6000002D)':
  99. // CHECK:STDOUT: value_repr: {kind: none, type: type(inst60000012)}
  100. // CHECK:STDOUT: 'type(inst60000030)':
  101. // CHECK:STDOUT: value_repr: {kind: none, type: type(inst60000012)}
  102. // CHECK:STDOUT: 'type(inst6000003B)':
  103. // CHECK:STDOUT: value_repr: {kind: none, type: type(inst60000012)}
  104. // CHECK:STDOUT: 'type(inst60000043)':
  105. // CHECK:STDOUT: value_repr: {kind: none, type: type(inst60000012)}
  106. // CHECK:STDOUT: insts:
  107. // CHECK:STDOUT: 'inst(TypeType)': {kind: TypeType, type: type(TypeType)}
  108. // CHECK:STDOUT: 'inst(AutoType)': {kind: AutoType, type: type(TypeType)}
  109. // CHECK:STDOUT: 'inst(BoolType)': {kind: BoolType, type: type(TypeType)}
  110. // CHECK:STDOUT: 'inst(BoundMethodType)': {kind: BoundMethodType, type: type(TypeType)}
  111. // CHECK:STDOUT: 'inst(CharLiteralType)': {kind: CharLiteralType, type: type(TypeType)}
  112. // CHECK:STDOUT: 'inst(CppVoidType)': {kind: CppVoidType, type: type(TypeType)}
  113. // CHECK:STDOUT: 'inst(ErrorInst)': {kind: ErrorInst, type: type(Error)}
  114. // CHECK:STDOUT: 'inst(FloatLiteralType)': {kind: FloatLiteralType, type: type(TypeType)}
  115. // CHECK:STDOUT: 'inst(InstType)': {kind: InstType, type: type(TypeType)}
  116. // CHECK:STDOUT: 'inst(IntLiteralType)': {kind: IntLiteralType, type: type(TypeType)}
  117. // CHECK:STDOUT: 'inst(NamespaceType)': {kind: NamespaceType, type: type(TypeType)}
  118. // CHECK:STDOUT: 'inst(SpecificFunctionType)': {kind: SpecificFunctionType, type: type(TypeType)}
  119. // CHECK:STDOUT: 'inst(VtableType)': {kind: VtableType, type: type(TypeType)}
  120. // CHECK:STDOUT: 'inst(WitnessType)': {kind: WitnessType, type: type(TypeType)}
  121. // CHECK:STDOUT: instE: {kind: Namespace, arg0: name_scope0, arg1: inst<none>, type: type(inst(NamespaceType))}
  122. // CHECK:STDOUT: inst6000000F: {kind: ImportCppDecl}
  123. // CHECK:STDOUT: inst60000010: {kind: Namespace, arg0: name_scope60000001, arg1: inst6000000F, type: type(inst(NamespaceType))}
  124. // CHECK:STDOUT: inst60000011: {kind: NameRef, arg0: name(Cpp), arg1: inst60000010, type: type(inst(NamespaceType))}
  125. // CHECK:STDOUT: inst60000012: {kind: TupleType, arg0: inst_block_empty, type: type(TypeType)}
  126. // CHECK:STDOUT: inst60000013: {kind: ClassDecl, arg0: class60000000, arg1: inst_block<none>, type: type(TypeType)}
  127. // CHECK:STDOUT: inst60000014: {kind: ClassType, arg0: class60000000, arg1: specific<none>, type: type(TypeType)}
  128. // CHECK:STDOUT: inst60000015: {kind: NameRef, arg0: name2, arg1: inst60000013, type: type(TypeType)}
  129. // CHECK:STDOUT: inst60000016: {kind: ValueBinding, arg0: entity_name60000000, arg1: inst6000001A, type: type(inst60000014)}
  130. // CHECK:STDOUT: inst60000017: {kind: PatternType, arg0: inst60000014, type: type(TypeType)}
  131. // CHECK:STDOUT: inst60000018: {kind: ValueBindingPattern, arg0: entity_name60000000, type: type(inst60000017)}
  132. // CHECK:STDOUT: inst60000019: {kind: ValueParamPattern, arg0: inst60000018, arg1: call_param0, type: type(inst60000017)}
  133. // CHECK:STDOUT: inst6000001A: {kind: ValueParam, arg0: call_param0, arg1: name1, type: type(inst60000014)}
  134. // CHECK:STDOUT: inst6000001B: {kind: SpliceBlock, arg0: inst_block60000004, arg1: inst60000015, type: type(TypeType)}
  135. // CHECK:STDOUT: inst6000001C: {kind: FunctionDecl, arg0: function60000000, arg1: inst_block60000008, type: type(inst6000001D)}
  136. // CHECK:STDOUT: inst6000001D: {kind: FunctionType, arg0: function60000000, arg1: specific<none>, type: type(TypeType)}
  137. // CHECK:STDOUT: inst6000001E: {kind: StructValue, arg0: inst_block_empty, type: type(inst6000001D)}
  138. // CHECK:STDOUT: inst6000001F: {kind: PointerType, arg0: inst60000014, type: type(TypeType)}
  139. // CHECK:STDOUT: inst60000020: {kind: UnboundElementType, arg0: inst60000014, arg1: inst6000001F, type: type(TypeType)}
  140. // CHECK:STDOUT: inst60000021: {kind: FieldDecl, arg0: name5, arg1: element0, type: type(inst60000020)}
  141. // CHECK:STDOUT: inst60000022: {kind: CustomLayoutType, arg0: struct_type_fields60000001, arg1: custom_layout60000001, type: type(TypeType)}
  142. // CHECK:STDOUT: inst60000023: {kind: CustomLayoutType, arg0: struct_type_fields60000002, arg1: custom_layout60000001, type: type(TypeType)}
  143. // CHECK:STDOUT: inst60000024: {kind: CompleteTypeWitness, arg0: inst60000022, type: type(inst(WitnessType))}
  144. // CHECK:STDOUT: inst60000025: {kind: CompleteTypeWitness, arg0: inst60000023, type: type(inst(WitnessType))}
  145. // CHECK:STDOUT: inst60000026: {kind: PointerType, arg0: inst60000023, type: type(TypeType)}
  146. // CHECK:STDOUT: inst60000027: {kind: NameRef, arg0: name(Cpp), arg1: inst60000010, type: type(inst(NamespaceType))}
  147. // CHECK:STDOUT: inst60000028: {kind: CppOverloadSetType, arg0: cpp_overload_set60000000, arg1: specific<none>, type: type(TypeType)}
  148. // CHECK:STDOUT: inst60000029: {kind: CppOverloadSetValue, arg0: cpp_overload_set60000000, type: type(inst60000028)}
  149. // CHECK:STDOUT: inst6000002A: {kind: CppOverloadSetValue, arg0: cpp_overload_set60000000, type: type(inst60000028)}
  150. // CHECK:STDOUT: inst6000002B: {kind: NameRef, arg0: name3, arg1: inst60000029, type: type(inst60000028)}
  151. // CHECK:STDOUT: inst6000002C: {kind: FunctionDecl, arg0: function60000001, arg1: inst_block_empty, type: type(inst6000002D)}
  152. // CHECK:STDOUT: inst6000002D: {kind: FunctionType, arg0: function60000001, arg1: specific<none>, type: type(TypeType)}
  153. // CHECK:STDOUT: inst6000002E: {kind: StructValue, arg0: inst_block_empty, type: type(inst6000002D)}
  154. // CHECK:STDOUT: inst6000002F: {kind: FunctionDecl, arg0: function60000002, arg1: inst_block_empty, type: type(inst60000030)}
  155. // CHECK:STDOUT: inst60000030: {kind: FunctionType, arg0: function60000002, arg1: specific<none>, type: type(TypeType)}
  156. // CHECK:STDOUT: inst60000031: {kind: StructValue, arg0: inst_block_empty, type: type(inst60000030)}
  157. // CHECK:STDOUT: inst60000032: {kind: Call, arg0: inst6000002F, arg1: inst_block_empty, type: type(inst60000012)}
  158. // CHECK:STDOUT: inst60000033: {kind: NameRef, arg0: name(Cpp), arg1: inst60000010, type: type(inst(NamespaceType))}
  159. // CHECK:STDOUT: inst60000034: {kind: NameRef, arg0: name3, arg1: inst60000029, type: type(inst60000028)}
  160. // CHECK:STDOUT: inst60000035: {kind: NameRef, arg0: name1, arg1: inst60000016, type: type(inst60000014)}
  161. // CHECK:STDOUT: inst60000036: {kind: ValueBinding, arg0: entity_name60000001, arg1: inst60000039, type: type(inst60000014)}
  162. // CHECK:STDOUT: inst60000037: {kind: ValueBindingPattern, arg0: entity_name60000001, type: type(inst60000017)}
  163. // CHECK:STDOUT: inst60000038: {kind: ValueParamPattern, arg0: inst60000037, arg1: call_param0, type: type(inst60000017)}
  164. // CHECK:STDOUT: inst60000039: {kind: ValueParam, arg0: call_param0, arg1: name1, type: type(inst60000014)}
  165. // CHECK:STDOUT: inst6000003A: {kind: FunctionDecl, arg0: function60000003, arg1: inst_block6000000F, type: type(inst6000003B)}
  166. // CHECK:STDOUT: inst6000003B: {kind: FunctionType, arg0: function60000003, arg1: specific<none>, type: type(TypeType)}
  167. // CHECK:STDOUT: inst6000003C: {kind: StructValue, arg0: inst_block_empty, type: type(inst6000003B)}
  168. // CHECK:STDOUT: inst6000003D: {kind: ValueBinding, arg0: entity_name60000002, arg1: inst60000041, type: type(inst6000001F)}
  169. // CHECK:STDOUT: inst6000003E: {kind: PatternType, arg0: inst6000001F, type: type(TypeType)}
  170. // CHECK:STDOUT: inst6000003F: {kind: ValueBindingPattern, arg0: entity_name60000002, type: type(inst6000003E)}
  171. // CHECK:STDOUT: inst60000040: {kind: ValueParamPattern, arg0: inst6000003F, arg1: call_param0, type: type(inst6000003E)}
  172. // CHECK:STDOUT: inst60000041: {kind: ValueParam, arg0: call_param0, arg1: name1, type: type(inst6000001F)}
  173. // CHECK:STDOUT: inst60000042: {kind: FunctionDecl, arg0: function60000004, arg1: inst_block60000014, type: type(inst60000043)}
  174. // CHECK:STDOUT: inst60000043: {kind: FunctionType, arg0: function60000004, arg1: specific<none>, type: type(TypeType)}
  175. // CHECK:STDOUT: inst60000044: {kind: StructValue, arg0: inst_block_empty, type: type(inst60000043)}
  176. // CHECK:STDOUT: inst60000045: {kind: ValueAsRef, arg0: inst60000035, type: type(inst60000014)}
  177. // CHECK:STDOUT: inst60000046: {kind: AddrOf, arg0: inst60000045, type: type(inst6000001F)}
  178. // CHECK:STDOUT: inst60000047: {kind: Call, arg0: inst60000042, arg1: inst_block60000016, type: type(inst60000012)}
  179. // CHECK:STDOUT: inst60000048: {kind: NameRef, arg0: name(Cpp), arg1: inst60000010, type: type(inst(NamespaceType))}
  180. // CHECK:STDOUT: inst60000049: {kind: NameRef, arg0: name3, arg1: inst60000029, type: type(inst60000028)}
  181. // CHECK:STDOUT: inst6000004A: {kind: NameRef, arg0: name(Cpp), arg1: inst60000010, type: type(inst(NamespaceType))}
  182. // CHECK:STDOUT: inst6000004B: {kind: VarStorage, arg0: inst6000004D, type: type(inst6000001F)}
  183. // CHECK:STDOUT: inst6000004C: {kind: RefBindingPattern, arg0: entity_name60000003, type: type(inst6000003E)}
  184. // CHECK:STDOUT: inst6000004D: {kind: VarPattern, arg0: inst6000004C, type: type(inst6000003E)}
  185. // CHECK:STDOUT: inst6000004E: {kind: NameBindingDecl, arg0: inst_block60000017}
  186. // CHECK:STDOUT: inst6000004F: {kind: NameRef, arg0: name4, arg1: inst6000004B, type: type(inst6000001F)}
  187. // CHECK:STDOUT: inst60000050: {kind: AcquireValue, arg0: inst6000004F, type: type(inst6000001F)}
  188. // CHECK:STDOUT: inst60000051: {kind: Deref, arg0: inst60000050, type: type(inst60000014)}
  189. // CHECK:STDOUT: inst60000052: {kind: AcquireValue, arg0: inst60000051, type: type(inst60000014)}
  190. // CHECK:STDOUT: inst60000053: {kind: ValueAsRef, arg0: inst60000052, type: type(inst60000014)}
  191. // CHECK:STDOUT: inst60000054: {kind: AddrOf, arg0: inst60000053, type: type(inst6000001F)}
  192. // CHECK:STDOUT: inst60000055: {kind: Call, arg0: inst60000042, arg1: inst_block60000019, type: type(inst60000012)}
  193. // CHECK:STDOUT: inst60000056: {kind: Return}
  194. // CHECK:STDOUT: constant_values:
  195. // CHECK:STDOUT: values:
  196. // CHECK:STDOUT: 'inst(TypeType)': concrete_constant(inst(TypeType))
  197. // CHECK:STDOUT: 'inst(AutoType)': concrete_constant(inst(AutoType))
  198. // CHECK:STDOUT: 'inst(BoolType)': concrete_constant(inst(BoolType))
  199. // CHECK:STDOUT: 'inst(BoundMethodType)': concrete_constant(inst(BoundMethodType))
  200. // CHECK:STDOUT: 'inst(CharLiteralType)': concrete_constant(inst(CharLiteralType))
  201. // CHECK:STDOUT: 'inst(CppVoidType)': concrete_constant(inst(CppVoidType))
  202. // CHECK:STDOUT: 'inst(ErrorInst)': concrete_constant(inst(ErrorInst))
  203. // CHECK:STDOUT: 'inst(FloatLiteralType)': concrete_constant(inst(FloatLiteralType))
  204. // CHECK:STDOUT: 'inst(InstType)': concrete_constant(inst(InstType))
  205. // CHECK:STDOUT: 'inst(IntLiteralType)': concrete_constant(inst(IntLiteralType))
  206. // CHECK:STDOUT: 'inst(NamespaceType)': concrete_constant(inst(NamespaceType))
  207. // CHECK:STDOUT: 'inst(SpecificFunctionType)': concrete_constant(inst(SpecificFunctionType))
  208. // CHECK:STDOUT: 'inst(VtableType)': concrete_constant(inst(VtableType))
  209. // CHECK:STDOUT: 'inst(WitnessType)': concrete_constant(inst(WitnessType))
  210. // CHECK:STDOUT: instE: concrete_constant(instE)
  211. // CHECK:STDOUT: inst60000010: concrete_constant(inst60000010)
  212. // CHECK:STDOUT: inst60000011: concrete_constant(inst60000010)
  213. // CHECK:STDOUT: inst60000012: concrete_constant(inst60000012)
  214. // CHECK:STDOUT: inst60000013: concrete_constant(inst60000014)
  215. // CHECK:STDOUT: inst60000014: concrete_constant(inst60000014)
  216. // CHECK:STDOUT: inst60000015: concrete_constant(inst60000014)
  217. // CHECK:STDOUT: inst60000017: concrete_constant(inst60000017)
  218. // CHECK:STDOUT: inst60000018: concrete_constant(inst60000018)
  219. // CHECK:STDOUT: inst60000019: concrete_constant(inst60000019)
  220. // CHECK:STDOUT: inst6000001B: concrete_constant(inst60000014)
  221. // CHECK:STDOUT: inst6000001C: concrete_constant(inst6000001E)
  222. // CHECK:STDOUT: inst6000001D: concrete_constant(inst6000001D)
  223. // CHECK:STDOUT: inst6000001E: concrete_constant(inst6000001E)
  224. // CHECK:STDOUT: inst6000001F: concrete_constant(inst6000001F)
  225. // CHECK:STDOUT: inst60000020: concrete_constant(inst60000020)
  226. // CHECK:STDOUT: inst60000021: concrete_constant(inst60000021)
  227. // CHECK:STDOUT: inst60000022: concrete_constant(inst60000023)
  228. // CHECK:STDOUT: inst60000023: concrete_constant(inst60000023)
  229. // CHECK:STDOUT: inst60000024: concrete_constant(inst60000025)
  230. // CHECK:STDOUT: inst60000025: concrete_constant(inst60000025)
  231. // CHECK:STDOUT: inst60000026: concrete_constant(inst60000026)
  232. // CHECK:STDOUT: inst60000027: concrete_constant(inst60000010)
  233. // CHECK:STDOUT: inst60000028: concrete_constant(inst60000028)
  234. // CHECK:STDOUT: inst60000029: concrete_constant(inst6000002A)
  235. // CHECK:STDOUT: inst6000002A: concrete_constant(inst6000002A)
  236. // CHECK:STDOUT: inst6000002B: concrete_constant(inst6000002A)
  237. // CHECK:STDOUT: inst6000002C: concrete_constant(inst6000002E)
  238. // CHECK:STDOUT: inst6000002D: concrete_constant(inst6000002D)
  239. // CHECK:STDOUT: inst6000002E: concrete_constant(inst6000002E)
  240. // CHECK:STDOUT: inst6000002F: concrete_constant(inst60000031)
  241. // CHECK:STDOUT: inst60000030: concrete_constant(inst60000030)
  242. // CHECK:STDOUT: inst60000031: concrete_constant(inst60000031)
  243. // CHECK:STDOUT: inst60000033: concrete_constant(inst60000010)
  244. // CHECK:STDOUT: inst60000034: concrete_constant(inst6000002A)
  245. // CHECK:STDOUT: inst60000037: concrete_constant(inst60000037)
  246. // CHECK:STDOUT: inst60000038: concrete_constant(inst60000038)
  247. // CHECK:STDOUT: inst6000003A: concrete_constant(inst6000003C)
  248. // CHECK:STDOUT: inst6000003B: concrete_constant(inst6000003B)
  249. // CHECK:STDOUT: inst6000003C: concrete_constant(inst6000003C)
  250. // CHECK:STDOUT: inst6000003E: concrete_constant(inst6000003E)
  251. // CHECK:STDOUT: inst6000003F: concrete_constant(inst6000003F)
  252. // CHECK:STDOUT: inst60000040: concrete_constant(inst60000040)
  253. // CHECK:STDOUT: inst60000042: concrete_constant(inst60000044)
  254. // CHECK:STDOUT: inst60000043: concrete_constant(inst60000043)
  255. // CHECK:STDOUT: inst60000044: concrete_constant(inst60000044)
  256. // CHECK:STDOUT: inst60000048: concrete_constant(inst60000010)
  257. // CHECK:STDOUT: inst60000049: concrete_constant(inst6000002A)
  258. // CHECK:STDOUT: inst6000004A: concrete_constant(inst60000010)
  259. // CHECK:STDOUT: inst6000004B: concrete_constant(inst6000004B)
  260. // CHECK:STDOUT: inst6000004C: concrete_constant(inst6000004C)
  261. // CHECK:STDOUT: inst6000004D: concrete_constant(inst6000004D)
  262. // CHECK:STDOUT: inst6000004F: concrete_constant(inst6000004B)
  263. // CHECK:STDOUT: symbolic_constants: {}
  264. // CHECK:STDOUT: inst_blocks:
  265. // CHECK:STDOUT: inst_block_empty: {}
  266. // CHECK:STDOUT: exports:
  267. // CHECK:STDOUT: 0: inst6000001C
  268. // CHECK:STDOUT: imports:
  269. // CHECK:STDOUT: 0: inst60000010
  270. // CHECK:STDOUT: 1: inst60000013
  271. // CHECK:STDOUT: 2: inst60000029
  272. // CHECK:STDOUT: 3: inst6000002C
  273. // CHECK:STDOUT: 4: inst6000002F
  274. // CHECK:STDOUT: 5: inst6000003A
  275. // CHECK:STDOUT: 6: inst60000042
  276. // CHECK:STDOUT: 7: inst6000004B
  277. // CHECK:STDOUT: 8: inst6000004E
  278. // CHECK:STDOUT: global_init: {}
  279. // CHECK:STDOUT: inst_block60000004:
  280. // CHECK:STDOUT: 0: inst60000011
  281. // CHECK:STDOUT: 1: inst60000015
  282. // CHECK:STDOUT: inst_block60000005:
  283. // CHECK:STDOUT: 0: inst60000019
  284. // CHECK:STDOUT: inst_block60000006:
  285. // CHECK:STDOUT: 0: inst6000001A
  286. // CHECK:STDOUT: inst_block60000007:
  287. // CHECK:STDOUT: 0: inst60000018
  288. // CHECK:STDOUT: 1: inst60000019
  289. // CHECK:STDOUT: inst_block60000008:
  290. // CHECK:STDOUT: 0: inst6000001A
  291. // CHECK:STDOUT: 1: inst6000001B
  292. // CHECK:STDOUT: 2: inst60000016
  293. // CHECK:STDOUT: inst_block60000009:
  294. // CHECK:STDOUT: 0: inst60000027
  295. // CHECK:STDOUT: 1: inst6000002B
  296. // CHECK:STDOUT: 2: inst60000032
  297. // CHECK:STDOUT: 3: inst60000033
  298. // CHECK:STDOUT: 4: inst60000034
  299. // CHECK:STDOUT: 5: inst60000035
  300. // CHECK:STDOUT: 6: inst60000045
  301. // CHECK:STDOUT: 7: inst60000046
  302. // CHECK:STDOUT: 8: inst60000047
  303. // CHECK:STDOUT: 9: inst60000048
  304. // CHECK:STDOUT: 10: inst60000049
  305. // CHECK:STDOUT: 11: inst6000004A
  306. // CHECK:STDOUT: 12: inst6000004F
  307. // CHECK:STDOUT: 13: inst60000050
  308. // CHECK:STDOUT: 14: inst60000051
  309. // CHECK:STDOUT: 15: inst60000052
  310. // CHECK:STDOUT: 16: inst60000053
  311. // CHECK:STDOUT: 17: inst60000054
  312. // CHECK:STDOUT: 18: inst60000055
  313. // CHECK:STDOUT: 19: inst60000056
  314. // CHECK:STDOUT: inst_block6000000A:
  315. // CHECK:STDOUT: 0: inst60000021
  316. // CHECK:STDOUT: 1: inst60000022
  317. // CHECK:STDOUT: 2: inst60000024
  318. // CHECK:STDOUT: inst_block6000000B: {}
  319. // CHECK:STDOUT: inst_block6000000C:
  320. // CHECK:STDOUT: 0: inst60000038
  321. // CHECK:STDOUT: inst_block6000000D:
  322. // CHECK:STDOUT: 0: inst60000039
  323. // CHECK:STDOUT: inst_block6000000E:
  324. // CHECK:STDOUT: 0: inst60000037
  325. // CHECK:STDOUT: 1: inst60000038
  326. // CHECK:STDOUT: inst_block6000000F:
  327. // CHECK:STDOUT: 0: inst60000039
  328. // CHECK:STDOUT: 1: inst60000036
  329. // CHECK:STDOUT: inst_block60000010: {}
  330. // CHECK:STDOUT: inst_block60000011:
  331. // CHECK:STDOUT: 0: inst60000040
  332. // CHECK:STDOUT: inst_block60000012:
  333. // CHECK:STDOUT: 0: inst60000041
  334. // CHECK:STDOUT: inst_block60000013:
  335. // CHECK:STDOUT: 0: inst6000003F
  336. // CHECK:STDOUT: 1: inst60000040
  337. // CHECK:STDOUT: inst_block60000014:
  338. // CHECK:STDOUT: 0: inst60000041
  339. // CHECK:STDOUT: 1: inst6000003D
  340. // CHECK:STDOUT: inst_block60000015:
  341. // CHECK:STDOUT: 0: inst60000035
  342. // CHECK:STDOUT: inst_block60000016:
  343. // CHECK:STDOUT: 0: inst60000046
  344. // CHECK:STDOUT: inst_block60000017:
  345. // CHECK:STDOUT: 0: inst6000004C
  346. // CHECK:STDOUT: 1: inst6000004D
  347. // CHECK:STDOUT: inst_block60000018:
  348. // CHECK:STDOUT: 0: inst60000052
  349. // CHECK:STDOUT: inst_block60000019:
  350. // CHECK:STDOUT: 0: inst60000054
  351. // CHECK:STDOUT: inst_block6000001A:
  352. // CHECK:STDOUT: 0: instE
  353. // CHECK:STDOUT: 1: inst6000000F
  354. // CHECK:STDOUT: 2: inst6000001C
  355. // CHECK:STDOUT: ...