Justin Lebar | 1041101 | 2016-09-30 23:57:30 +0000 | [diff] [blame^] | 1 | // RUN: %clang_cc1 -fsyntax-only -verify %s |
| 2 | // RUN: %clang_cc1 -fsyntax-only -fcuda-is-device -verify %s |
| 3 | |
| 4 | #include "Inputs/cuda.h" |
| 5 | |
| 6 | __device__ void foo() { |
| 7 | extern __shared__ int x; // expected-error {{__shared__ variable 'x' cannot be 'extern'}} |
| 8 | } |
| 9 | |
| 10 | __host__ __device__ void bar() { |
| 11 | extern __shared__ int x; // expected-error {{__shared__ variable 'x' cannot be 'extern'}} |
| 12 | } |
| 13 | |
| 14 | extern __shared__ int global; // expected-error {{__shared__ variable 'global' cannot be 'extern'}} |