diff options
| author | Justin Lebar <jlebar@google.com> | 2016-10-13 18:45:13 +0000 |
|---|---|---|
| committer | Justin Lebar <jlebar@google.com> | 2016-10-13 18:45:13 +0000 |
| commit | aa370bd0d77c136bc6ba87c7b20d007a53e82602 (patch) | |
| tree | 02c923c7e31bf18513da0488ed0be7403fed2b52 /clang/test/SemaCUDA/bad-attributes.cu | |
| parent | 179bdce72a4d36abeb9ba6ece8cf312456b92e73 (diff) | |
| download | bcm5719-llvm-aa370bd0d77c136bc6ba87c7b20d007a53e82602.tar.gz bcm5719-llvm-aa370bd0d77c136bc6ba87c7b20d007a53e82602.zip | |
[CUDA] Disallow __shared__ variables in host functions.
Reviewers: tra, rnk
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D25143
llvm-svn: 284144
Diffstat (limited to 'clang/test/SemaCUDA/bad-attributes.cu')
| -rw-r--r-- | clang/test/SemaCUDA/bad-attributes.cu | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/clang/test/SemaCUDA/bad-attributes.cu b/clang/test/SemaCUDA/bad-attributes.cu index 4fb584aec4c..5aaff975967 100644 --- a/clang/test/SemaCUDA/bad-attributes.cu +++ b/clang/test/SemaCUDA/bad-attributes.cu @@ -65,6 +65,7 @@ __global__ static inline void foobar() {}; __constant__ int global_constant; void host_fn() { __constant__ int c; // expected-error {{__constant__ variables must be global}} + __shared__ int s; // expected-error {{__shared__ local variables not allowed in __host__ functions}} } __device__ void device_fn() { __constant__ int c; // expected-error {{__constant__ variables must be global}} |

