OLD | NEW |
1 ; RUN: pnacl-abicheck < %s | FileCheck %s | 1 ; RUN: not pnacl-abicheck < %s | FileCheck %s |
2 | 2 |
3 ; This test checks that the "addrspace" pointer attribute is rejected | 3 ; This test checks that the "addrspace" pointer attribute is rejected |
4 ; by the PNaCl ABI verifier. The only allowed address space value is | 4 ; by the PNaCl ABI verifier. The only allowed address space value is |
5 ; 0 (the default). | 5 ; 0 (the default). |
6 | 6 |
7 @var = addrspace(1) global [4 x i8] c"xxxx" | 7 @var = addrspace(1) global [4 x i8] c"xxxx" |
8 ; CHECK: Variable var has addrspace attribute (disallowed) | 8 ; CHECK: Variable var has addrspace attribute (disallowed) |
9 | 9 |
10 define void @func() { | 10 define void @func() { |
11 inttoptr i32 0 to i32 addrspace(2)* | 11 inttoptr i32 0 to i32 addrspace(2)* |
12 ; CHECK: disallowed: bad result type: {{.*}} inttoptr {{.*}} addrspace | 12 ; CHECK: disallowed: bad result type: {{.*}} inttoptr {{.*}} addrspace |
13 ret void | 13 ret void |
14 } | 14 } |
15 | 15 |
16 ; CHECK-NOT: disallowed | 16 ; CHECK-NOT: disallowed |
OLD | NEW |