summaryrefslogtreecommitdiff
path: root/test/CodeGenCUDA/device-var-init.cu
diff options
context:
space:
mode:
Diffstat (limited to 'test/CodeGenCUDA/device-var-init.cu')
-rw-r--r--test/CodeGenCUDA/device-var-init.cu8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/CodeGenCUDA/device-var-init.cu b/test/CodeGenCUDA/device-var-init.cu
index 864cc6daee..23c9fe1376 100644
--- a/test/CodeGenCUDA/device-var-init.cu
+++ b/test/CodeGenCUDA/device-var-init.cu
@@ -368,6 +368,14 @@ __device__ void df() {
T_F_NEC t_f_nec;
T_FA_NEC t_fa_nec;
static __shared__ UC s_uc;
+#if ERROR_CASE
+ static __device__ int ds;
+ // expected-error@-1 {{Within a __device__/__global__ function, only __shared__ variables may be marked "static"}}
+ static __constant__ int dc;
+ // expected-error@-1 {{Within a __device__/__global__ function, only __shared__ variables may be marked "static"}}
+ static int v;
+ // expected-error@-1 {{Within a __device__/__global__ function, only __shared__ variables may be marked "static"}}
+#endif
}
// CHECK: call void @_ZN2ECC1Ev(%struct.EC* %ec)