blob: 9450bbfa5ad6842d148159cb15bd915267e20d14 [file] [log] [blame]
Justin Lebar10411012016-09-30 23:57:30 +00001// 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
14extern __shared__ int global; // expected-error {{__shared__ variable 'global' cannot be 'extern'}}