|
| 1 | +; RUN: not llvm-as < %s -o /dev/null 2>&1 | FileCheck %s |
| 2 | + |
| 3 | +target datalayout = "p0:64:64-p1:32:32" |
| 4 | + |
| 5 | + |
| 6 | +@absolute_empty_arguments = external global i32, !absolute_symbol !0 |
| 7 | + |
| 8 | +@absolute_one_argument = external global i32, !absolute_symbol !1 |
| 9 | + |
| 10 | +@absolute_three_arguments = external global i32, !absolute_symbol !2 |
| 11 | + |
| 12 | + |
| 13 | + |
| 14 | +@absolute_one_argument_wrong_width = external global i32, !absolute_symbol !3 |
| 15 | +@absolute_two_arguments_wrong_width = external global i32, !absolute_symbol !4 |
| 16 | + |
| 17 | +@absolute_two_arguments_one_wrong_width0 = external global i32, !absolute_symbol !5 |
| 18 | +@absolute_two_arguments_one_wrong_width1 = external global i32, !absolute_symbol !6 |
| 19 | + |
| 20 | +@absolute_zero_zero = external global i32, !absolute_symbol !7 |
| 21 | + |
| 22 | +@absolute_equal_other = external global i32, !absolute_symbol !8 |
| 23 | + |
| 24 | +@absolute_wrong_width_non0_as = external addrspace(1) global i32, !absolute_symbol !9 |
| 25 | + |
| 26 | +; Test other kinds of symbols besides GlobalVariable |
| 27 | +define void @absolute_func_empty_arguments() !absolute_symbol !0 { |
| 28 | + ret void |
| 29 | +} |
| 30 | + |
| 31 | +@absolute_is_fp = external global i32, !absolute_symbol !10 |
| 32 | +@absolute_is_vector = external global i32, !absolute_symbol !11 |
| 33 | +@absolute_is_ptr = external global i32, !absolute_symbol !12 |
| 34 | +@absolute_is_ptr0 = external global i32, !absolute_symbol !13 |
| 35 | +@absolute_is_ptr1 = external global i32, !absolute_symbol !14 |
| 36 | + |
| 37 | +@absolute_wrong_order = external global i32, !absolute_symbol !15 |
| 38 | + |
| 39 | +; CHECK: It should have at least one range! |
| 40 | +; CHECK-NEXT: !0 = !{} |
| 41 | +; CHECK: It should have at least one range! |
| 42 | +; CHECK-NEXT: !0 = !{} |
| 43 | +!0 = !{} |
| 44 | + |
| 45 | +; CHECK-NEXT: Unfinished range! |
| 46 | +; CHECK-NEXT: !1 = !{i64 128} |
| 47 | +!1 = !{i64 128} |
| 48 | + |
| 49 | +; CHECK-NEXT: Unfinished range! |
| 50 | +; CHECK-NEXT: !2 = !{i64 128, i64 256, i64 512} |
| 51 | +!2 = !{i64 128, i64 256, i64 512} |
| 52 | + |
| 53 | +; CHECK-NEXT: Unfinished range! |
| 54 | +; CHECK-NEXT: !3 = !{i32 256} |
| 55 | +!3 = !{i32 256} |
| 56 | + |
| 57 | +; CHECK-NEXT: Range types must match instruction type! |
| 58 | +; CHECK-NEXT: ptr @absolute_two_arguments_wrong_width |
| 59 | +!4 = !{i32 256, i32 512} |
| 60 | + |
| 61 | +; CHECK-NEXT: Range types must match instruction type! |
| 62 | +; CHECK-NEXT: ptr @absolute_two_arguments_one_wrong_width0 |
| 63 | +!5 = !{i32 256, i64 512} |
| 64 | + |
| 65 | +; CHECK-NEXT: Range types must match instruction type! |
| 66 | +; CHECK-NEXT: ptr @absolute_two_arguments_one_wrong_width1 |
| 67 | +!6 = !{i64 256, i32 512} |
| 68 | + |
| 69 | +; CHECK-NEXT: Range must not be empty! |
| 70 | +; CHECK-NEXT: !7 = !{i64 0, i64 0} |
| 71 | +!7 = !{i64 0, i64 0} |
| 72 | + |
| 73 | +; CHECK-NEXT: The upper and lower limits cannot be the same value |
| 74 | +; CHECK-NEXT: ptr @absolute_equal_other |
| 75 | +!8 = !{i64 123, i64 123} |
| 76 | + |
| 77 | +; CHECK-NEXT: Range types must match instruction type! |
| 78 | +; CHECK-NEXT: ptr addrspace(1) @absolute_wrong_width_non0_as |
| 79 | +!9 = !{i64 512, i64 256} |
| 80 | + |
| 81 | +; CHECK-NEXT: The lower limit must be an integer! |
| 82 | +!10 = !{float 0.0, float 256.0} |
| 83 | + |
| 84 | +; CHECK-NEXT: The lower limit must be an integer! |
| 85 | +!11 = !{<2 x i64> zeroinitializer, <2 x i64> <i64 256, i64 256>} |
| 86 | + |
| 87 | +; CHECK-NEXT: The lower limit must be an integer! |
| 88 | +!12 = !{ptr null, ptr inttoptr (i64 256 to ptr)} |
| 89 | + |
| 90 | +; CHECK-NEXT: The lower limit must be an integer! |
| 91 | +!13 = !{ptr null, i64 456} |
| 92 | + |
| 93 | +; CHECK-NEXT: The upper limit must be an integer! |
| 94 | +!14 = !{i64 456, ptr inttoptr (i64 512 to ptr)} |
| 95 | +!15 = !{i64 1024, i64 128} |
| 96 | + |
0 commit comments