int_float.carbon 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279
  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/deduce/int_float.carbon
  8. // TIP: To dump output, run:
  9. // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/deduce/int_float.carbon
  10. // --- int.carbon
  11. library "[[@TEST_NAME]]";
  12. fn F[N:! Core.IntLiteral()](n: Core.Int(N)) -> Core.IntLiteral() {
  13. return N;
  14. }
  15. fn G(a: i64) -> Core.IntLiteral() {
  16. return F(a);
  17. }
  18. // --- fail_todo_float.carbon
  19. library "[[@TEST_NAME]]";
  20. // TODO: This should pass once we accept symbolic widths for Core.Float.
  21. // CHECK:STDERR: fail_todo_float.carbon:[[@LINE+3]]:32: error: cannot evaluate type expression [TypeExprEvaluationFailure]
  22. // CHECK:STDERR: fn F[N:! Core.IntLiteral()](n: Core.Float(N)) -> Core.IntLiteral() {
  23. // CHECK:STDERR: ^~~~~~~~~~~~~
  24. fn F[N:! Core.IntLiteral()](n: Core.Float(N)) -> Core.IntLiteral() {
  25. return N;
  26. }
  27. fn G(a: f64) -> Core.IntLiteral() {
  28. return F(a);
  29. }
  30. // CHECK:STDOUT: --- int.carbon
  31. // CHECK:STDOUT:
  32. // CHECK:STDOUT: constants {
  33. // CHECK:STDOUT: %IntLiteral.type: type = fn_type @IntLiteral [template]
  34. // CHECK:STDOUT: %IntLiteral: %IntLiteral.type = struct_value () [template]
  35. // CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic]
  36. // CHECK:STDOUT: %N.patt: Core.IntLiteral = symbolic_binding_pattern N, 0 [symbolic]
  37. // CHECK:STDOUT: %Int.type: type = fn_type @Int [template]
  38. // CHECK:STDOUT: %Int: %Int.type = struct_value () [template]
  39. // CHECK:STDOUT: %iN: type = int_type signed, %N [symbolic]
  40. // CHECK:STDOUT: %F.type: type = fn_type @F [template]
  41. // CHECK:STDOUT: %F: %F.type = struct_value () [template]
  42. // CHECK:STDOUT: %.1: Core.IntLiteral = int_value 64 [template]
  43. // CHECK:STDOUT: %i64: type = int_type signed, %.1 [template]
  44. // CHECK:STDOUT: %G.type: type = fn_type @G [template]
  45. // CHECK:STDOUT: %G: %G.type = struct_value () [template]
  46. // CHECK:STDOUT: %.2: <specific function> = specific_function %F, @F(%.1) [template]
  47. // CHECK:STDOUT: }
  48. // CHECK:STDOUT:
  49. // CHECK:STDOUT: imports {
  50. // CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [template] {
  51. // CHECK:STDOUT: .IntLiteral = %import_ref.1
  52. // CHECK:STDOUT: .Int = %import_ref.2
  53. // CHECK:STDOUT: import Core//prelude
  54. // CHECK:STDOUT: import Core//prelude/...
  55. // CHECK:STDOUT: }
  56. // CHECK:STDOUT: %import_ref.1: %IntLiteral.type = import_ref Core//prelude/types, inst+7, loaded [template = constants.%IntLiteral]
  57. // CHECK:STDOUT: %import_ref.2: %Int.type = import_ref Core//prelude/types, inst+23, loaded [template = constants.%Int]
  58. // CHECK:STDOUT: }
  59. // CHECK:STDOUT:
  60. // CHECK:STDOUT: file {
  61. // CHECK:STDOUT: package: <namespace> = namespace [template] {
  62. // CHECK:STDOUT: .Core = imports.%Core
  63. // CHECK:STDOUT: .F = %F.decl
  64. // CHECK:STDOUT: .G = %G.decl
  65. // CHECK:STDOUT: }
  66. // CHECK:STDOUT: %Core.import = import Core
  67. // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] {
  68. // CHECK:STDOUT: %N.patt.loc4_6.1: Core.IntLiteral = symbolic_binding_pattern N, 0 [symbolic = %N.patt.loc4_6.2 (constants.%N.patt)]
  69. // CHECK:STDOUT: %N.param_patt: Core.IntLiteral = value_param_pattern %N.patt.loc4_6.1, runtime_param<invalid> [symbolic = %N.patt.loc4_6.2 (constants.%N.patt)]
  70. // CHECK:STDOUT: %n.patt: @F.%iN (%iN) = binding_pattern n
  71. // CHECK:STDOUT: %n.param_patt: @F.%iN (%iN) = value_param_pattern %n.patt, runtime_param0
  72. // CHECK:STDOUT: %return.patt: Core.IntLiteral = return_slot_pattern
  73. // CHECK:STDOUT: %return.param_patt: Core.IntLiteral = out_param_pattern %return.patt, runtime_param1
  74. // CHECK:STDOUT: } {
  75. // CHECK:STDOUT: %Core.ref.loc4_10: <namespace> = name_ref Core, imports.%Core [template = imports.%Core]
  76. // CHECK:STDOUT: %IntLiteral.ref.loc4_14: %IntLiteral.type = name_ref IntLiteral, imports.%import_ref.1 [template = constants.%IntLiteral]
  77. // CHECK:STDOUT: %int_literal.make_type.loc4_25: init type = call %IntLiteral.ref.loc4_14() [template = Core.IntLiteral]
  78. // CHECK:STDOUT: %.loc4_26.1: type = value_of_initializer %int_literal.make_type.loc4_25 [template = Core.IntLiteral]
  79. // CHECK:STDOUT: %.loc4_26.2: type = converted %int_literal.make_type.loc4_25, %.loc4_26.1 [template = Core.IntLiteral]
  80. // CHECK:STDOUT: %Core.ref.loc4_32: <namespace> = name_ref Core, imports.%Core [template = imports.%Core]
  81. // CHECK:STDOUT: %Int.ref: %Int.type = name_ref Int, imports.%import_ref.2 [template = constants.%Int]
  82. // CHECK:STDOUT: %N.ref.loc4: Core.IntLiteral = name_ref N, %N.loc4_6.1 [symbolic = %N.loc4_6.2 (constants.%N)]
  83. // CHECK:STDOUT: %int.make_type_signed: init type = call %Int.ref(%N.ref.loc4) [symbolic = %iN (constants.%iN)]
  84. // CHECK:STDOUT: %.loc4_42.1: type = value_of_initializer %int.make_type_signed [symbolic = %iN (constants.%iN)]
  85. // CHECK:STDOUT: %.loc4_42.2: type = converted %int.make_type_signed, %.loc4_42.1 [symbolic = %iN (constants.%iN)]
  86. // CHECK:STDOUT: %Core.ref.loc4_48: <namespace> = name_ref Core, imports.%Core [template = imports.%Core]
  87. // CHECK:STDOUT: %IntLiteral.ref.loc4_52: %IntLiteral.type = name_ref IntLiteral, imports.%import_ref.1 [template = constants.%IntLiteral]
  88. // CHECK:STDOUT: %int_literal.make_type.loc4_63: init type = call %IntLiteral.ref.loc4_52() [template = Core.IntLiteral]
  89. // CHECK:STDOUT: %.loc4_64.1: type = value_of_initializer %int_literal.make_type.loc4_63 [template = Core.IntLiteral]
  90. // CHECK:STDOUT: %.loc4_64.2: type = converted %int_literal.make_type.loc4_63, %.loc4_64.1 [template = Core.IntLiteral]
  91. // CHECK:STDOUT: %N.param: Core.IntLiteral = value_param runtime_param<invalid>
  92. // CHECK:STDOUT: %N.loc4_6.1: Core.IntLiteral = bind_symbolic_name N, 0, %N.param [symbolic = %N.loc4_6.2 (constants.%N)]
  93. // CHECK:STDOUT: %n.param: @F.%iN (%iN) = value_param runtime_param0
  94. // CHECK:STDOUT: %n: @F.%iN (%iN) = bind_name n, %n.param
  95. // CHECK:STDOUT: %return.param: ref Core.IntLiteral = out_param runtime_param1
  96. // CHECK:STDOUT: %return: ref Core.IntLiteral = return_slot %return.param
  97. // CHECK:STDOUT: }
  98. // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] {
  99. // CHECK:STDOUT: %a.patt: %i64 = binding_pattern a
  100. // CHECK:STDOUT: %a.param_patt: %i64 = value_param_pattern %a.patt, runtime_param0
  101. // CHECK:STDOUT: %return.patt: Core.IntLiteral = return_slot_pattern
  102. // CHECK:STDOUT: %return.param_patt: Core.IntLiteral = out_param_pattern %return.patt, runtime_param1
  103. // CHECK:STDOUT: } {
  104. // CHECK:STDOUT: %.loc8_9.1: Core.IntLiteral = int_value 64 [template = constants.%.1]
  105. // CHECK:STDOUT: %int.make_type_signed: init type = call constants.%Int(%.loc8_9.1) [template = constants.%i64]
  106. // CHECK:STDOUT: %.loc8_9.2: type = value_of_initializer %int.make_type_signed [template = constants.%i64]
  107. // CHECK:STDOUT: %.loc8_9.3: type = converted %int.make_type_signed, %.loc8_9.2 [template = constants.%i64]
  108. // CHECK:STDOUT: %Core.ref: <namespace> = name_ref Core, imports.%Core [template = imports.%Core]
  109. // CHECK:STDOUT: %IntLiteral.ref: %IntLiteral.type = name_ref IntLiteral, imports.%import_ref.1 [template = constants.%IntLiteral]
  110. // CHECK:STDOUT: %int_literal.make_type: init type = call %IntLiteral.ref() [template = Core.IntLiteral]
  111. // CHECK:STDOUT: %.loc8_33.1: type = value_of_initializer %int_literal.make_type [template = Core.IntLiteral]
  112. // CHECK:STDOUT: %.loc8_33.2: type = converted %int_literal.make_type, %.loc8_33.1 [template = Core.IntLiteral]
  113. // CHECK:STDOUT: %a.param: %i64 = value_param runtime_param0
  114. // CHECK:STDOUT: %a: %i64 = bind_name a, %a.param
  115. // CHECK:STDOUT: %return.param: ref Core.IntLiteral = out_param runtime_param1
  116. // CHECK:STDOUT: %return: ref Core.IntLiteral = return_slot %return.param
  117. // CHECK:STDOUT: }
  118. // CHECK:STDOUT: }
  119. // CHECK:STDOUT:
  120. // CHECK:STDOUT: generic fn @F(%N.loc4_6.1: Core.IntLiteral) {
  121. // CHECK:STDOUT: %N.loc4_6.2: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N.loc4_6.2 (constants.%N)]
  122. // CHECK:STDOUT: %N.patt.loc4_6.2: Core.IntLiteral = symbolic_binding_pattern N, 0 [symbolic = %N.patt.loc4_6.2 (constants.%N.patt)]
  123. // CHECK:STDOUT: %iN: type = int_type signed, %N.loc4_6.2 [symbolic = %iN (constants.%iN)]
  124. // CHECK:STDOUT:
  125. // CHECK:STDOUT: !definition:
  126. // CHECK:STDOUT:
  127. // CHECK:STDOUT: fn[%N.param_patt: Core.IntLiteral](%n.param_patt: @F.%iN (%iN)) -> Core.IntLiteral {
  128. // CHECK:STDOUT: !entry:
  129. // CHECK:STDOUT: %N.ref.loc5: Core.IntLiteral = name_ref N, %N.loc4_6.1 [symbolic = %N.loc4_6.2 (constants.%N)]
  130. // CHECK:STDOUT: return %N.ref.loc5
  131. // CHECK:STDOUT: }
  132. // CHECK:STDOUT: }
  133. // CHECK:STDOUT:
  134. // CHECK:STDOUT: fn @G(%a.param_patt: %i64) -> Core.IntLiteral {
  135. // CHECK:STDOUT: !entry:
  136. // CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [template = constants.%F]
  137. // CHECK:STDOUT: %a.ref: %i64 = name_ref a, %a
  138. // CHECK:STDOUT: %.loc9_10: <specific function> = specific_function %F.ref, @F(constants.%.1) [template = constants.%.2]
  139. // CHECK:STDOUT: %F.call: init Core.IntLiteral = call %.loc9_10(%a.ref)
  140. // CHECK:STDOUT: %.loc9_14.1: Core.IntLiteral = value_of_initializer %F.call
  141. // CHECK:STDOUT: %.loc9_14.2: Core.IntLiteral = converted %F.call, %.loc9_14.1
  142. // CHECK:STDOUT: return %.loc9_14.2
  143. // CHECK:STDOUT: }
  144. // CHECK:STDOUT:
  145. // CHECK:STDOUT: specific @F(constants.%N) {
  146. // CHECK:STDOUT: %N.loc4_6.2 => constants.%N
  147. // CHECK:STDOUT: %N.patt.loc4_6.2 => constants.%N
  148. // CHECK:STDOUT: %iN => constants.%iN
  149. // CHECK:STDOUT: }
  150. // CHECK:STDOUT:
  151. // CHECK:STDOUT: specific @F(constants.%.1) {
  152. // CHECK:STDOUT: %N.loc4_6.2 => constants.%.1
  153. // CHECK:STDOUT: %N.patt.loc4_6.2 => constants.%.1
  154. // CHECK:STDOUT: %iN => constants.%i64
  155. // CHECK:STDOUT:
  156. // CHECK:STDOUT: !definition:
  157. // CHECK:STDOUT: }
  158. // CHECK:STDOUT:
  159. // CHECK:STDOUT: --- fail_todo_float.carbon
  160. // CHECK:STDOUT:
  161. // CHECK:STDOUT: constants {
  162. // CHECK:STDOUT: %IntLiteral.type: type = fn_type @IntLiteral [template]
  163. // CHECK:STDOUT: %IntLiteral: %IntLiteral.type = struct_value () [template]
  164. // CHECK:STDOUT: %N: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic]
  165. // CHECK:STDOUT: %N.patt: Core.IntLiteral = symbolic_binding_pattern N, 0 [symbolic]
  166. // CHECK:STDOUT: %Float.type: type = fn_type @Float [template]
  167. // CHECK:STDOUT: %Float: %Float.type = struct_value () [template]
  168. // CHECK:STDOUT: %F.type: type = fn_type @F [template]
  169. // CHECK:STDOUT: %F: %F.type = struct_value () [template]
  170. // CHECK:STDOUT: %.1: Core.IntLiteral = int_value 64 [template]
  171. // CHECK:STDOUT: %G.type: type = fn_type @G [template]
  172. // CHECK:STDOUT: %G: %G.type = struct_value () [template]
  173. // CHECK:STDOUT: }
  174. // CHECK:STDOUT:
  175. // CHECK:STDOUT: imports {
  176. // CHECK:STDOUT: %Core: <namespace> = namespace file.%Core.import, [template] {
  177. // CHECK:STDOUT: .IntLiteral = %import_ref.1
  178. // CHECK:STDOUT: .Float = %import_ref.2
  179. // CHECK:STDOUT: import Core//prelude
  180. // CHECK:STDOUT: import Core//prelude/...
  181. // CHECK:STDOUT: }
  182. // CHECK:STDOUT: %import_ref.1: %IntLiteral.type = import_ref Core//prelude/types, inst+7, loaded [template = constants.%IntLiteral]
  183. // CHECK:STDOUT: %import_ref.2: %Float.type = import_ref Core//prelude/types, inst+53, loaded [template = constants.%Float]
  184. // CHECK:STDOUT: }
  185. // CHECK:STDOUT:
  186. // CHECK:STDOUT: file {
  187. // CHECK:STDOUT: package: <namespace> = namespace [template] {
  188. // CHECK:STDOUT: .Core = imports.%Core
  189. // CHECK:STDOUT: .F = %F.decl
  190. // CHECK:STDOUT: .G = %G.decl
  191. // CHECK:STDOUT: }
  192. // CHECK:STDOUT: %Core.import = import Core
  193. // CHECK:STDOUT: %F.decl: %F.type = fn_decl @F [template = constants.%F] {
  194. // CHECK:STDOUT: %N.patt.loc8_6.1: Core.IntLiteral = symbolic_binding_pattern N, 0 [symbolic = %N.patt.loc8_6.2 (constants.%N.patt)]
  195. // CHECK:STDOUT: %N.param_patt: Core.IntLiteral = value_param_pattern %N.patt.loc8_6.1, runtime_param<invalid> [symbolic = %N.patt.loc8_6.2 (constants.%N.patt)]
  196. // CHECK:STDOUT: %n.patt: <error> = binding_pattern n
  197. // CHECK:STDOUT: %n.param_patt: <error> = value_param_pattern %n.patt, runtime_param0
  198. // CHECK:STDOUT: %return.patt: Core.IntLiteral = return_slot_pattern
  199. // CHECK:STDOUT: %return.param_patt: Core.IntLiteral = out_param_pattern %return.patt, runtime_param1
  200. // CHECK:STDOUT: } {
  201. // CHECK:STDOUT: %Core.ref.loc8_10: <namespace> = name_ref Core, imports.%Core [template = imports.%Core]
  202. // CHECK:STDOUT: %IntLiteral.ref.loc8_14: %IntLiteral.type = name_ref IntLiteral, imports.%import_ref.1 [template = constants.%IntLiteral]
  203. // CHECK:STDOUT: %int_literal.make_type.loc8_25: init type = call %IntLiteral.ref.loc8_14() [template = Core.IntLiteral]
  204. // CHECK:STDOUT: %.loc8_26.1: type = value_of_initializer %int_literal.make_type.loc8_25 [template = Core.IntLiteral]
  205. // CHECK:STDOUT: %.loc8_26.2: type = converted %int_literal.make_type.loc8_25, %.loc8_26.1 [template = Core.IntLiteral]
  206. // CHECK:STDOUT: %Core.ref.loc8_32: <namespace> = name_ref Core, imports.%Core [template = imports.%Core]
  207. // CHECK:STDOUT: %Float.ref: %Float.type = name_ref Float, imports.%import_ref.2 [template = constants.%Float]
  208. // CHECK:STDOUT: %N.ref.loc8: Core.IntLiteral = name_ref N, %N.loc8_6.1 [symbolic = %N.loc8_6.2 (constants.%N)]
  209. // CHECK:STDOUT: %float.make_type: init type = call %Float.ref(%N.ref.loc8)
  210. // CHECK:STDOUT: %.loc8_44.1: type = value_of_initializer %float.make_type
  211. // CHECK:STDOUT: %.loc8_44.2: type = converted %float.make_type, %.loc8_44.1
  212. // CHECK:STDOUT: %Core.ref.loc8_50: <namespace> = name_ref Core, imports.%Core [template = imports.%Core]
  213. // CHECK:STDOUT: %IntLiteral.ref.loc8_54: %IntLiteral.type = name_ref IntLiteral, imports.%import_ref.1 [template = constants.%IntLiteral]
  214. // CHECK:STDOUT: %int_literal.make_type.loc8_65: init type = call %IntLiteral.ref.loc8_54() [template = Core.IntLiteral]
  215. // CHECK:STDOUT: %.loc8_66.1: type = value_of_initializer %int_literal.make_type.loc8_65 [template = Core.IntLiteral]
  216. // CHECK:STDOUT: %.loc8_66.2: type = converted %int_literal.make_type.loc8_65, %.loc8_66.1 [template = Core.IntLiteral]
  217. // CHECK:STDOUT: %N.param: Core.IntLiteral = value_param runtime_param<invalid>
  218. // CHECK:STDOUT: %N.loc8_6.1: Core.IntLiteral = bind_symbolic_name N, 0, %N.param [symbolic = %N.loc8_6.2 (constants.%N)]
  219. // CHECK:STDOUT: %n.param: <error> = value_param runtime_param0
  220. // CHECK:STDOUT: %n: <error> = bind_name n, %n.param
  221. // CHECK:STDOUT: %return.param: ref Core.IntLiteral = out_param runtime_param1
  222. // CHECK:STDOUT: %return: ref Core.IntLiteral = return_slot %return.param
  223. // CHECK:STDOUT: }
  224. // CHECK:STDOUT: %G.decl: %G.type = fn_decl @G [template = constants.%G] {
  225. // CHECK:STDOUT: %a.patt: f64 = binding_pattern a
  226. // CHECK:STDOUT: %a.param_patt: f64 = value_param_pattern %a.patt, runtime_param0
  227. // CHECK:STDOUT: %return.patt: Core.IntLiteral = return_slot_pattern
  228. // CHECK:STDOUT: %return.param_patt: Core.IntLiteral = out_param_pattern %return.patt, runtime_param1
  229. // CHECK:STDOUT: } {
  230. // CHECK:STDOUT: %.loc12_9.1: Core.IntLiteral = int_value 64 [template = constants.%.1]
  231. // CHECK:STDOUT: %float.make_type: init type = call constants.%Float(%.loc12_9.1) [template = f64]
  232. // CHECK:STDOUT: %.loc12_9.2: type = value_of_initializer %float.make_type [template = f64]
  233. // CHECK:STDOUT: %.loc12_9.3: type = converted %float.make_type, %.loc12_9.2 [template = f64]
  234. // CHECK:STDOUT: %Core.ref: <namespace> = name_ref Core, imports.%Core [template = imports.%Core]
  235. // CHECK:STDOUT: %IntLiteral.ref: %IntLiteral.type = name_ref IntLiteral, imports.%import_ref.1 [template = constants.%IntLiteral]
  236. // CHECK:STDOUT: %int_literal.make_type: init type = call %IntLiteral.ref() [template = Core.IntLiteral]
  237. // CHECK:STDOUT: %.loc12_33.1: type = value_of_initializer %int_literal.make_type [template = Core.IntLiteral]
  238. // CHECK:STDOUT: %.loc12_33.2: type = converted %int_literal.make_type, %.loc12_33.1 [template = Core.IntLiteral]
  239. // CHECK:STDOUT: %a.param: f64 = value_param runtime_param0
  240. // CHECK:STDOUT: %a: f64 = bind_name a, %a.param
  241. // CHECK:STDOUT: %return.param: ref Core.IntLiteral = out_param runtime_param1
  242. // CHECK:STDOUT: %return: ref Core.IntLiteral = return_slot %return.param
  243. // CHECK:STDOUT: }
  244. // CHECK:STDOUT: }
  245. // CHECK:STDOUT:
  246. // CHECK:STDOUT: generic fn @F(%N.loc8_6.1: Core.IntLiteral) {
  247. // CHECK:STDOUT: %N.loc8_6.2: Core.IntLiteral = bind_symbolic_name N, 0 [symbolic = %N.loc8_6.2 (constants.%N)]
  248. // CHECK:STDOUT: %N.patt.loc8_6.2: Core.IntLiteral = symbolic_binding_pattern N, 0 [symbolic = %N.patt.loc8_6.2 (constants.%N.patt)]
  249. // CHECK:STDOUT:
  250. // CHECK:STDOUT: !definition:
  251. // CHECK:STDOUT:
  252. // CHECK:STDOUT: fn[%N.param_patt: Core.IntLiteral](%n.param_patt: <error>) -> Core.IntLiteral {
  253. // CHECK:STDOUT: !entry:
  254. // CHECK:STDOUT: %N.ref.loc9: Core.IntLiteral = name_ref N, %N.loc8_6.1 [symbolic = %N.loc8_6.2 (constants.%N)]
  255. // CHECK:STDOUT: return %N.ref.loc9
  256. // CHECK:STDOUT: }
  257. // CHECK:STDOUT: }
  258. // CHECK:STDOUT:
  259. // CHECK:STDOUT: fn @G(%a.param_patt: f64) -> Core.IntLiteral {
  260. // CHECK:STDOUT: !entry:
  261. // CHECK:STDOUT: %F.ref: %F.type = name_ref F, file.%F.decl [template = constants.%F]
  262. // CHECK:STDOUT: %a.ref: f64 = name_ref a, %a
  263. // CHECK:STDOUT: return <error>
  264. // CHECK:STDOUT: }
  265. // CHECK:STDOUT:
  266. // CHECK:STDOUT: specific @F(constants.%N) {
  267. // CHECK:STDOUT: %N.loc8_6.2 => constants.%N
  268. // CHECK:STDOUT: %N.patt.loc8_6.2 => constants.%N
  269. // CHECK:STDOUT: }
  270. // CHECK:STDOUT: