clang/test/SemaCUDA/spirv-int128.cu
raw| 1 | // RUN: %clang_cc1 -triple spirv64 -aux-triple x86_64-unknown-linux-gnu \ |
| 2 | // RUN: -fcuda-is-device -verify -fsyntax-only %s |
| 3 | |
| 4 | #define __device__ __attribute__((device)) |
| 5 | |
| 6 | __int128 h_glb; |
| 7 | |
| 8 | __device__ __int128 d_unused; |
| 9 | |
| 10 | // expected-note@+1 {{'d_glb' defined here}} |
| 11 | __device__ __int128 d_glb; |
| 12 | |
| 13 | __device__ __int128 bar() { |
| 14 | // expected-error@+1 {{'d_glb' requires 128 bit size '__int128' type support, but target 'spirv64' does not support it}} |
| 15 | return d_glb; |
| 16 | } |