float.carbon 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321
  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/primitives.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/lower/testdata/builtins/float.carbon
  10. // TIP: To dump output, run:
  11. // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/lower/testdata/builtins/float.carbon
  12. // --- basic.carbon
  13. library "[[@TEST_NAME]]";
  14. fn Negate(a: f64) -> f64 = "float.negate";
  15. fn TestNegate(a: f64) -> f64 { return Negate(a); }
  16. fn Add(a: f64, b: f64) -> f64 = "float.add";
  17. fn TestAdd(a: f64, b: f64) -> f64 { return Add(a, b); }
  18. fn Sub(a: f64, b: f64) -> f64 = "float.sub";
  19. fn TestSub(a: f64, b: f64) -> f64 { return Sub(a, b); }
  20. fn Mul(a: f64, b: f64) -> f64 = "float.mul";
  21. fn TestMul(a: f64, b: f64) -> f64 { return Mul(a, b); }
  22. fn Div(a: f64, b: f64) -> f64 = "float.div";
  23. fn TestDiv(a: f64, b: f64) -> f64 { return Div(a, b); }
  24. fn Eq(a: f64, b: f64) -> bool = "float.eq";
  25. fn TestEq(a: f64, b: f64) -> bool { return Eq(a, b); }
  26. fn Neq(a: f64, b: f64) -> bool = "float.neq";
  27. fn TestNeq(a: f64, b: f64) -> bool { return Neq(a, b); }
  28. fn Less(a: f64, b: f64) -> bool = "float.less";
  29. fn TestLess(a: f64, b: f64) -> bool { return Less(a, b); }
  30. fn LessEq(a: f64, b: f64) -> bool = "float.less_eq";
  31. fn TestLessEq(a: f64, b: f64) -> bool { return LessEq(a, b); }
  32. fn Greater(a: f64, b: f64) -> bool = "float.greater";
  33. fn TestGreater(a: f64, b: f64) -> bool { return Greater(a, b); }
  34. fn GreaterEq(a: f64, b: f64) -> bool = "float.greater_eq";
  35. fn TestGreaterEq(a: f64, b: f64) -> bool { return GreaterEq(a, b); }
  36. // --- compound_assign.carbon
  37. library "[[@TEST_NAME]]";
  38. fn Add(a: f64*, b: f64) = "float.add_assign";
  39. fn TestAdd(a: f64*, b: f64) { Add(a, b); }
  40. fn Sub(a: f64*, b: f64) = "float.sub_assign";
  41. fn TestSub(a: f64*, b: f64) { Sub(a, b); }
  42. fn Mul(a: f64*, b: f64) = "float.mul_assign";
  43. fn TestMul(a: f64*, b: f64) { Mul(a, b); }
  44. fn Div(a: f64*, b: f64) = "float.div_assign";
  45. fn TestDiv(a: f64*, b: f64) { Div(a, b); }
  46. // --- types.carbon
  47. library "[[@TEST_NAME]]";
  48. fn F16(a: f16, b: f16) -> f16 = "float.add";
  49. fn TestF16(a: f16, b: f16) -> f16 { return F16(a, b); }
  50. fn F32(a: f32, b: f32) -> f32 = "float.add";
  51. fn TestF32(a: f32, b: f32) -> f32 { return F32(a, b); }
  52. fn F64(a: f64, b: f64) -> f64 = "float.add";
  53. fn TestF64(a: f64, b: f64) -> f64 { return F64(a, b); }
  54. fn F128(a: f128, b: f128) -> f128 = "float.add";
  55. fn TestF128(a: f128, b: f128) -> f128 { return F128(a, b); }
  56. // CHECK:STDOUT: ; ModuleID = 'basic.carbon'
  57. // CHECK:STDOUT: source_filename = "basic.carbon"
  58. // CHECK:STDOUT:
  59. // CHECK:STDOUT: ; Function Attrs: nounwind
  60. // CHECK:STDOUT: define double @_CTestNegate.Main(double %a) #0 !dbg !4 {
  61. // CHECK:STDOUT: entry:
  62. // CHECK:STDOUT: %Negate.call = fneg double %a, !dbg !7
  63. // CHECK:STDOUT: ret double %Negate.call, !dbg !8
  64. // CHECK:STDOUT: }
  65. // CHECK:STDOUT:
  66. // CHECK:STDOUT: ; Function Attrs: nounwind
  67. // CHECK:STDOUT: define double @_CTestAdd.Main(double %a, double %b) #0 !dbg !9 {
  68. // CHECK:STDOUT: entry:
  69. // CHECK:STDOUT: %Add.call = fadd double %a, %b, !dbg !10
  70. // CHECK:STDOUT: ret double %Add.call, !dbg !11
  71. // CHECK:STDOUT: }
  72. // CHECK:STDOUT:
  73. // CHECK:STDOUT: ; Function Attrs: nounwind
  74. // CHECK:STDOUT: define double @_CTestSub.Main(double %a, double %b) #0 !dbg !12 {
  75. // CHECK:STDOUT: entry:
  76. // CHECK:STDOUT: %Sub.call = fsub double %a, %b, !dbg !13
  77. // CHECK:STDOUT: ret double %Sub.call, !dbg !14
  78. // CHECK:STDOUT: }
  79. // CHECK:STDOUT:
  80. // CHECK:STDOUT: ; Function Attrs: nounwind
  81. // CHECK:STDOUT: define double @_CTestMul.Main(double %a, double %b) #0 !dbg !15 {
  82. // CHECK:STDOUT: entry:
  83. // CHECK:STDOUT: %Mul.call = fmul double %a, %b, !dbg !16
  84. // CHECK:STDOUT: ret double %Mul.call, !dbg !17
  85. // CHECK:STDOUT: }
  86. // CHECK:STDOUT:
  87. // CHECK:STDOUT: ; Function Attrs: nounwind
  88. // CHECK:STDOUT: define double @_CTestDiv.Main(double %a, double %b) #0 !dbg !18 {
  89. // CHECK:STDOUT: entry:
  90. // CHECK:STDOUT: %Div.call = fdiv double %a, %b, !dbg !19
  91. // CHECK:STDOUT: ret double %Div.call, !dbg !20
  92. // CHECK:STDOUT: }
  93. // CHECK:STDOUT:
  94. // CHECK:STDOUT: ; Function Attrs: nounwind
  95. // CHECK:STDOUT: define i1 @_CTestEq.Main(double %a, double %b) #0 !dbg !21 {
  96. // CHECK:STDOUT: entry:
  97. // CHECK:STDOUT: %Eq.call = fcmp oeq double %a, %b, !dbg !22
  98. // CHECK:STDOUT: ret i1 %Eq.call, !dbg !23
  99. // CHECK:STDOUT: }
  100. // CHECK:STDOUT:
  101. // CHECK:STDOUT: ; Function Attrs: nounwind
  102. // CHECK:STDOUT: define i1 @_CTestNeq.Main(double %a, double %b) #0 !dbg !24 {
  103. // CHECK:STDOUT: entry:
  104. // CHECK:STDOUT: %Neq.call = fcmp one double %a, %b, !dbg !25
  105. // CHECK:STDOUT: ret i1 %Neq.call, !dbg !26
  106. // CHECK:STDOUT: }
  107. // CHECK:STDOUT:
  108. // CHECK:STDOUT: ; Function Attrs: nounwind
  109. // CHECK:STDOUT: define i1 @_CTestLess.Main(double %a, double %b) #0 !dbg !27 {
  110. // CHECK:STDOUT: entry:
  111. // CHECK:STDOUT: %Less.call = fcmp olt double %a, %b, !dbg !28
  112. // CHECK:STDOUT: ret i1 %Less.call, !dbg !29
  113. // CHECK:STDOUT: }
  114. // CHECK:STDOUT:
  115. // CHECK:STDOUT: ; Function Attrs: nounwind
  116. // CHECK:STDOUT: define i1 @_CTestLessEq.Main(double %a, double %b) #0 !dbg !30 {
  117. // CHECK:STDOUT: entry:
  118. // CHECK:STDOUT: %LessEq.call = fcmp ole double %a, %b, !dbg !31
  119. // CHECK:STDOUT: ret i1 %LessEq.call, !dbg !32
  120. // CHECK:STDOUT: }
  121. // CHECK:STDOUT:
  122. // CHECK:STDOUT: ; Function Attrs: nounwind
  123. // CHECK:STDOUT: define i1 @_CTestGreater.Main(double %a, double %b) #0 !dbg !33 {
  124. // CHECK:STDOUT: entry:
  125. // CHECK:STDOUT: %Greater.call = fcmp ogt double %a, %b, !dbg !34
  126. // CHECK:STDOUT: ret i1 %Greater.call, !dbg !35
  127. // CHECK:STDOUT: }
  128. // CHECK:STDOUT:
  129. // CHECK:STDOUT: ; Function Attrs: nounwind
  130. // CHECK:STDOUT: define i1 @_CTestGreaterEq.Main(double %a, double %b) #0 !dbg !36 {
  131. // CHECK:STDOUT: entry:
  132. // CHECK:STDOUT: %GreaterEq.call = fcmp oge double %a, %b, !dbg !37
  133. // CHECK:STDOUT: ret i1 %GreaterEq.call, !dbg !38
  134. // CHECK:STDOUT: }
  135. // CHECK:STDOUT:
  136. // CHECK:STDOUT: attributes #0 = { nounwind }
  137. // CHECK:STDOUT:
  138. // CHECK:STDOUT: !llvm.module.flags = !{!0, !1}
  139. // CHECK:STDOUT: !llvm.dbg.cu = !{!2}
  140. // CHECK:STDOUT:
  141. // CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5}
  142. // CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3}
  143. // CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug)
  144. // CHECK:STDOUT: !3 = !DIFile(filename: "basic.carbon", directory: "")
  145. // CHECK:STDOUT: !4 = distinct !DISubprogram(name: "TestNegate", linkageName: "_CTestNegate.Main", scope: null, file: !3, line: 5, type: !5, spFlags: DISPFlagDefinition, unit: !2)
  146. // CHECK:STDOUT: !5 = !DISubroutineType(types: !6)
  147. // CHECK:STDOUT: !6 = !{}
  148. // CHECK:STDOUT: !7 = !DILocation(line: 5, column: 39, scope: !4)
  149. // CHECK:STDOUT: !8 = !DILocation(line: 5, column: 32, scope: !4)
  150. // CHECK:STDOUT: !9 = distinct !DISubprogram(name: "TestAdd", linkageName: "_CTestAdd.Main", scope: null, file: !3, line: 8, type: !5, spFlags: DISPFlagDefinition, unit: !2)
  151. // CHECK:STDOUT: !10 = !DILocation(line: 8, column: 44, scope: !9)
  152. // CHECK:STDOUT: !11 = !DILocation(line: 8, column: 37, scope: !9)
  153. // CHECK:STDOUT: !12 = distinct !DISubprogram(name: "TestSub", linkageName: "_CTestSub.Main", scope: null, file: !3, line: 11, type: !5, spFlags: DISPFlagDefinition, unit: !2)
  154. // CHECK:STDOUT: !13 = !DILocation(line: 11, column: 44, scope: !12)
  155. // CHECK:STDOUT: !14 = !DILocation(line: 11, column: 37, scope: !12)
  156. // CHECK:STDOUT: !15 = distinct !DISubprogram(name: "TestMul", linkageName: "_CTestMul.Main", scope: null, file: !3, line: 14, type: !5, spFlags: DISPFlagDefinition, unit: !2)
  157. // CHECK:STDOUT: !16 = !DILocation(line: 14, column: 44, scope: !15)
  158. // CHECK:STDOUT: !17 = !DILocation(line: 14, column: 37, scope: !15)
  159. // CHECK:STDOUT: !18 = distinct !DISubprogram(name: "TestDiv", linkageName: "_CTestDiv.Main", scope: null, file: !3, line: 17, type: !5, spFlags: DISPFlagDefinition, unit: !2)
  160. // CHECK:STDOUT: !19 = !DILocation(line: 17, column: 44, scope: !18)
  161. // CHECK:STDOUT: !20 = !DILocation(line: 17, column: 37, scope: !18)
  162. // CHECK:STDOUT: !21 = distinct !DISubprogram(name: "TestEq", linkageName: "_CTestEq.Main", scope: null, file: !3, line: 20, type: !5, spFlags: DISPFlagDefinition, unit: !2)
  163. // CHECK:STDOUT: !22 = !DILocation(line: 20, column: 44, scope: !21)
  164. // CHECK:STDOUT: !23 = !DILocation(line: 20, column: 37, scope: !21)
  165. // CHECK:STDOUT: !24 = distinct !DISubprogram(name: "TestNeq", linkageName: "_CTestNeq.Main", scope: null, file: !3, line: 23, type: !5, spFlags: DISPFlagDefinition, unit: !2)
  166. // CHECK:STDOUT: !25 = !DILocation(line: 23, column: 45, scope: !24)
  167. // CHECK:STDOUT: !26 = !DILocation(line: 23, column: 38, scope: !24)
  168. // CHECK:STDOUT: !27 = distinct !DISubprogram(name: "TestLess", linkageName: "_CTestLess.Main", scope: null, file: !3, line: 26, type: !5, spFlags: DISPFlagDefinition, unit: !2)
  169. // CHECK:STDOUT: !28 = !DILocation(line: 26, column: 46, scope: !27)
  170. // CHECK:STDOUT: !29 = !DILocation(line: 26, column: 39, scope: !27)
  171. // CHECK:STDOUT: !30 = distinct !DISubprogram(name: "TestLessEq", linkageName: "_CTestLessEq.Main", scope: null, file: !3, line: 29, type: !5, spFlags: DISPFlagDefinition, unit: !2)
  172. // CHECK:STDOUT: !31 = !DILocation(line: 29, column: 48, scope: !30)
  173. // CHECK:STDOUT: !32 = !DILocation(line: 29, column: 41, scope: !30)
  174. // CHECK:STDOUT: !33 = distinct !DISubprogram(name: "TestGreater", linkageName: "_CTestGreater.Main", scope: null, file: !3, line: 32, type: !5, spFlags: DISPFlagDefinition, unit: !2)
  175. // CHECK:STDOUT: !34 = !DILocation(line: 32, column: 49, scope: !33)
  176. // CHECK:STDOUT: !35 = !DILocation(line: 32, column: 42, scope: !33)
  177. // CHECK:STDOUT: !36 = distinct !DISubprogram(name: "TestGreaterEq", linkageName: "_CTestGreaterEq.Main", scope: null, file: !3, line: 35, type: !5, spFlags: DISPFlagDefinition, unit: !2)
  178. // CHECK:STDOUT: !37 = !DILocation(line: 35, column: 51, scope: !36)
  179. // CHECK:STDOUT: !38 = !DILocation(line: 35, column: 44, scope: !36)
  180. // CHECK:STDOUT: ; ModuleID = 'compound_assign.carbon'
  181. // CHECK:STDOUT: source_filename = "compound_assign.carbon"
  182. // CHECK:STDOUT:
  183. // CHECK:STDOUT: ; Function Attrs: nounwind
  184. // CHECK:STDOUT: define void @_CTestAdd.Main(ptr %a, double %b) #0 !dbg !4 {
  185. // CHECK:STDOUT: entry:
  186. // CHECK:STDOUT: %Add.call = load double, ptr %a, align 8, !dbg !7
  187. // CHECK:STDOUT: %Add.call1 = fadd double %Add.call, %b, !dbg !7
  188. // CHECK:STDOUT: store double %Add.call1, ptr %a, align 8, !dbg !7
  189. // CHECK:STDOUT: ret void, !dbg !8
  190. // CHECK:STDOUT: }
  191. // CHECK:STDOUT:
  192. // CHECK:STDOUT: ; Function Attrs: nounwind
  193. // CHECK:STDOUT: define void @_CTestSub.Main(ptr %a, double %b) #0 !dbg !9 {
  194. // CHECK:STDOUT: entry:
  195. // CHECK:STDOUT: %Sub.call = load double, ptr %a, align 8, !dbg !10
  196. // CHECK:STDOUT: %Sub.call1 = fsub double %Sub.call, %b, !dbg !10
  197. // CHECK:STDOUT: store double %Sub.call1, ptr %a, align 8, !dbg !10
  198. // CHECK:STDOUT: ret void, !dbg !11
  199. // CHECK:STDOUT: }
  200. // CHECK:STDOUT:
  201. // CHECK:STDOUT: ; Function Attrs: nounwind
  202. // CHECK:STDOUT: define void @_CTestMul.Main(ptr %a, double %b) #0 !dbg !12 {
  203. // CHECK:STDOUT: entry:
  204. // CHECK:STDOUT: %Mul.call = load double, ptr %a, align 8, !dbg !13
  205. // CHECK:STDOUT: %Mul.call1 = fmul double %Mul.call, %b, !dbg !13
  206. // CHECK:STDOUT: store double %Mul.call1, ptr %a, align 8, !dbg !13
  207. // CHECK:STDOUT: ret void, !dbg !14
  208. // CHECK:STDOUT: }
  209. // CHECK:STDOUT:
  210. // CHECK:STDOUT: ; Function Attrs: nounwind
  211. // CHECK:STDOUT: define void @_CTestDiv.Main(ptr %a, double %b) #0 !dbg !15 {
  212. // CHECK:STDOUT: entry:
  213. // CHECK:STDOUT: %Div.call = load double, ptr %a, align 8, !dbg !16
  214. // CHECK:STDOUT: %Div.call1 = fdiv double %Div.call, %b, !dbg !16
  215. // CHECK:STDOUT: store double %Div.call1, ptr %a, align 8, !dbg !16
  216. // CHECK:STDOUT: ret void, !dbg !17
  217. // CHECK:STDOUT: }
  218. // CHECK:STDOUT:
  219. // CHECK:STDOUT: attributes #0 = { nounwind }
  220. // CHECK:STDOUT:
  221. // CHECK:STDOUT: !llvm.module.flags = !{!0, !1}
  222. // CHECK:STDOUT: !llvm.dbg.cu = !{!2}
  223. // CHECK:STDOUT:
  224. // CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5}
  225. // CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3}
  226. // CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug)
  227. // CHECK:STDOUT: !3 = !DIFile(filename: "compound_assign.carbon", directory: "")
  228. // CHECK:STDOUT: !4 = distinct !DISubprogram(name: "TestAdd", linkageName: "_CTestAdd.Main", scope: null, file: !3, line: 5, type: !5, spFlags: DISPFlagDefinition, unit: !2)
  229. // CHECK:STDOUT: !5 = !DISubroutineType(types: !6)
  230. // CHECK:STDOUT: !6 = !{}
  231. // CHECK:STDOUT: !7 = !DILocation(line: 5, column: 31, scope: !4)
  232. // CHECK:STDOUT: !8 = !DILocation(line: 5, column: 1, scope: !4)
  233. // CHECK:STDOUT: !9 = distinct !DISubprogram(name: "TestSub", linkageName: "_CTestSub.Main", scope: null, file: !3, line: 8, type: !5, spFlags: DISPFlagDefinition, unit: !2)
  234. // CHECK:STDOUT: !10 = !DILocation(line: 8, column: 31, scope: !9)
  235. // CHECK:STDOUT: !11 = !DILocation(line: 8, column: 1, scope: !9)
  236. // CHECK:STDOUT: !12 = distinct !DISubprogram(name: "TestMul", linkageName: "_CTestMul.Main", scope: null, file: !3, line: 11, type: !5, spFlags: DISPFlagDefinition, unit: !2)
  237. // CHECK:STDOUT: !13 = !DILocation(line: 11, column: 31, scope: !12)
  238. // CHECK:STDOUT: !14 = !DILocation(line: 11, column: 1, scope: !12)
  239. // CHECK:STDOUT: !15 = distinct !DISubprogram(name: "TestDiv", linkageName: "_CTestDiv.Main", scope: null, file: !3, line: 14, type: !5, spFlags: DISPFlagDefinition, unit: !2)
  240. // CHECK:STDOUT: !16 = !DILocation(line: 14, column: 31, scope: !15)
  241. // CHECK:STDOUT: !17 = !DILocation(line: 14, column: 1, scope: !15)
  242. // CHECK:STDOUT: ; ModuleID = 'types.carbon'
  243. // CHECK:STDOUT: source_filename = "types.carbon"
  244. // CHECK:STDOUT:
  245. // CHECK:STDOUT: ; Function Attrs: nounwind
  246. // CHECK:STDOUT: define half @_CTestF16.Main(half %a, half %b) #0 !dbg !4 {
  247. // CHECK:STDOUT: entry:
  248. // CHECK:STDOUT: %F16.call = fadd half %a, %b, !dbg !7
  249. // CHECK:STDOUT: ret half %F16.call, !dbg !8
  250. // CHECK:STDOUT: }
  251. // CHECK:STDOUT:
  252. // CHECK:STDOUT: ; Function Attrs: nounwind
  253. // CHECK:STDOUT: define float @_CTestF32.Main(float %a, float %b) #0 !dbg !9 {
  254. // CHECK:STDOUT: entry:
  255. // CHECK:STDOUT: %F32.call = fadd float %a, %b, !dbg !10
  256. // CHECK:STDOUT: ret float %F32.call, !dbg !11
  257. // CHECK:STDOUT: }
  258. // CHECK:STDOUT:
  259. // CHECK:STDOUT: ; Function Attrs: nounwind
  260. // CHECK:STDOUT: define double @_CTestF64.Main(double %a, double %b) #0 !dbg !12 {
  261. // CHECK:STDOUT: entry:
  262. // CHECK:STDOUT: %F64.call = fadd double %a, %b, !dbg !13
  263. // CHECK:STDOUT: ret double %F64.call, !dbg !14
  264. // CHECK:STDOUT: }
  265. // CHECK:STDOUT:
  266. // CHECK:STDOUT: ; Function Attrs: nounwind
  267. // CHECK:STDOUT: define fp128 @_CTestF128.Main(fp128 %a, fp128 %b) #0 !dbg !15 {
  268. // CHECK:STDOUT: entry:
  269. // CHECK:STDOUT: %F128.call = fadd fp128 %a, %b, !dbg !16
  270. // CHECK:STDOUT: ret fp128 %F128.call, !dbg !17
  271. // CHECK:STDOUT: }
  272. // CHECK:STDOUT:
  273. // CHECK:STDOUT: attributes #0 = { nounwind }
  274. // CHECK:STDOUT:
  275. // CHECK:STDOUT: !llvm.module.flags = !{!0, !1}
  276. // CHECK:STDOUT: !llvm.dbg.cu = !{!2}
  277. // CHECK:STDOUT:
  278. // CHECK:STDOUT: !0 = !{i32 7, !"Dwarf Version", i32 5}
  279. // CHECK:STDOUT: !1 = !{i32 2, !"Debug Info Version", i32 3}
  280. // CHECK:STDOUT: !2 = distinct !DICompileUnit(language: DW_LANG_C, file: !3, producer: "carbon", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug)
  281. // CHECK:STDOUT: !3 = !DIFile(filename: "types.carbon", directory: "")
  282. // CHECK:STDOUT: !4 = distinct !DISubprogram(name: "TestF16", linkageName: "_CTestF16.Main", scope: null, file: !3, line: 5, type: !5, spFlags: DISPFlagDefinition, unit: !2)
  283. // CHECK:STDOUT: !5 = !DISubroutineType(types: !6)
  284. // CHECK:STDOUT: !6 = !{}
  285. // CHECK:STDOUT: !7 = !DILocation(line: 5, column: 44, scope: !4)
  286. // CHECK:STDOUT: !8 = !DILocation(line: 5, column: 37, scope: !4)
  287. // CHECK:STDOUT: !9 = distinct !DISubprogram(name: "TestF32", linkageName: "_CTestF32.Main", scope: null, file: !3, line: 8, type: !5, spFlags: DISPFlagDefinition, unit: !2)
  288. // CHECK:STDOUT: !10 = !DILocation(line: 8, column: 44, scope: !9)
  289. // CHECK:STDOUT: !11 = !DILocation(line: 8, column: 37, scope: !9)
  290. // CHECK:STDOUT: !12 = distinct !DISubprogram(name: "TestF64", linkageName: "_CTestF64.Main", scope: null, file: !3, line: 11, type: !5, spFlags: DISPFlagDefinition, unit: !2)
  291. // CHECK:STDOUT: !13 = !DILocation(line: 11, column: 44, scope: !12)
  292. // CHECK:STDOUT: !14 = !DILocation(line: 11, column: 37, scope: !12)
  293. // CHECK:STDOUT: !15 = distinct !DISubprogram(name: "TestF128", linkageName: "_CTestF128.Main", scope: null, file: !3, line: 14, type: !5, spFlags: DISPFlagDefinition, unit: !2)
  294. // CHECK:STDOUT: !16 = !DILocation(line: 14, column: 48, scope: !15)
  295. // CHECK:STDOUT: !17 = !DILocation(line: 14, column: 41, scope: !15)