Oliver Stannard | 9181785 | 2016-02-02 13:52:52 +0000 | [diff] [blame] | 1 | ; RUN: not %clang_cc1 -triple r600-unknown-unknown -S -o - %s 2>&1 | FileCheck %s |
| 2 | ; REQUIRES: amdgpu-registered-target |
| 3 | |
| 4 | ; This is to check that backend errors for unsupported features are formatted correctly |
| 5 | |
Matt Arsenault | 3ae7d63 | 2018-07-10 14:03:50 +0000 | [diff] [blame] | 6 | ; CHECK: error: test.c:2:20: in function bar i32 (): unsupported call to function foo |
Oliver Stannard | 9181785 | 2016-02-02 13:52:52 +0000 | [diff] [blame] | 7 | |
| 8 | target triple = "r600-unknown-unknown" |
| 9 | |
| 10 | ; Function Attrs: nounwind uwtable |
| 11 | define i32 @bar() #0 !dbg !4 { |
| 12 | entry: |
| 13 | %call = call i32 @foo(), !dbg !12 |
| 14 | ret i32 %call, !dbg !13 |
| 15 | } |
| 16 | |
| 17 | ; Function Attrs: nounwind uwtable |
| 18 | define i32 @foo() #0 !dbg !8 { |
| 19 | entry: |
| 20 | %call = call i32 @bar(), !dbg !14 |
| 21 | ret i32 %call, !dbg !15 |
| 22 | } |
| 23 | |
Matt Arsenault | 1dae500 | 2018-07-10 14:47:31 +0000 | [diff] [blame] | 24 | attributes #0 = { nounwind noinline "disable-tail-calls"="false" "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "unsafe-fp-math"="false" "use-soft-float"="false" } |
Oliver Stannard | 9181785 | 2016-02-02 13:52:52 +0000 | [diff] [blame] | 25 | |
| 26 | !llvm.dbg.cu = !{!0} |
| 27 | !llvm.module.flags = !{!9, !10} |
| 28 | !llvm.ident = !{!11} |
| 29 | |
Adrian Prantl | 80578e7 | 2016-04-15 16:05:13 +0000 | [diff] [blame] | 30 | !0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, producer: "clang version 3.9.0", isOptimized: false, runtimeVersion: 0, emissionKind: 1, enums: !2) |
Oliver Stannard | 9181785 | 2016-02-02 13:52:52 +0000 | [diff] [blame] | 31 | !1 = !DIFile(filename: "test.c", directory: "") |
| 32 | !2 = !{} |
Shiva Chen | 667fbe2 | 2018-05-09 02:41:56 +0000 | [diff] [blame] | 33 | !4 = distinct !DISubprogram(name: "bar", scope: !1, file: !1, line: 2, type: !5, isLocal: false, isDefinition: true, scopeLine: 2, isOptimized: false, unit: !0, retainedNodes: !2) |
Oliver Stannard | 9181785 | 2016-02-02 13:52:52 +0000 | [diff] [blame] | 34 | !5 = !DISubroutineType(types: !6) |
| 35 | !6 = !{!7} |
| 36 | !7 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed) |
Shiva Chen | 667fbe2 | 2018-05-09 02:41:56 +0000 | [diff] [blame] | 37 | !8 = distinct !DISubprogram(name: "foo", scope: !1, file: !1, line: 3, type: !5, isLocal: false, isDefinition: true, scopeLine: 3, flags: DIFlagPrototyped, isOptimized: false, unit: !0, retainedNodes: !2) |
Oliver Stannard | 9181785 | 2016-02-02 13:52:52 +0000 | [diff] [blame] | 38 | !9 = !{i32 2, !"Dwarf Version", i32 4} |
| 39 | !10 = !{i32 2, !"Debug Info Version", i32 3} |
| 40 | !11 = !{!"clang version 3.9.0"} |
| 41 | !12 = !DILocation(line: 2, column: 20, scope: !4) |
| 42 | !13 = !DILocation(line: 2, column: 13, scope: !4) |
| 43 | !14 = !DILocation(line: 3, column: 20, scope: !8) |
| 44 | !15 = !DILocation(line: 3, column: 13, scope: !8) |