[PowerPC] Collect some CallLowering arguments into a struct. [NFC]
[llvm-project.git] / clang / test / SemaCUDA / hip-pinned-shadow.cu
blobc58f7097af6ff8c4e437f0a8ae77efdbfe5937c9
1 // RUN: %clang_cc1 -triple amdgcn -fcuda-is-device -std=c++11 -fvisibility hidden -fapply-global-visibility-to-externs \
2 // RUN:     -emit-llvm -o - -x hip %s -fsyntax-only -verify
3 // RUN: %clang_cc1 -triple x86_64 -std=c++11 \
4 // RUN:     -emit-llvm -o - -x hip %s -fsyntax-only -verify
6 #define __device__ __attribute__((device))
7 #define __constant__ __attribute__((constant))
8 #define __hip_pinned_shadow__ __attribute((hip_pinned_shadow))
10 struct textureReference {
11   int a;
14 template <class T, int texType, int hipTextureReadMode>
15 struct texture : public textureReference {
16 texture() { a = 1; }
19 __hip_pinned_shadow__ texture<float, 2, 1> tex;
20 __device__ __hip_pinned_shadow__ texture<float, 2, 1> tex2; // expected-error{{'hip_pinned_shadow' and 'device' attributes are not compatible}}
21                                                             // expected-error@-1{{dynamic initialization is not supported for __device__, __constant__, and __shared__ variables}}
22                                                             // expected-note@-2{{conflicting attribute is here}}
23 __constant__ __hip_pinned_shadow__ texture<float, 2, 1> tex3; // expected-error{{'hip_pinned_shadow' and 'constant' attributes are not compatible}}
24                                                               // expected-error@-1{{dynamic initialization is not supported for __device__, __constant__, and __shared__ variables}}
25                                                               // expected-note@-2{{conflicting attribute is here}}