aboutsummaryrefslogtreecommitdiff
path: root/test/SemaOpenCL/storageclass.cl
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2017-06-26 20:33:12 +0000
committerDimitry Andric <dim@FreeBSD.org>2017-06-26 20:33:12 +0000
commitef915aab0ac566c55bfb0d7a9f6635bb5d94d4af (patch)
treeac935cfa19985d33098fc13e288b5ac830672dba /test/SemaOpenCL/storageclass.cl
parent325377b57338e700317f5e423e5b0f1c08d99a39 (diff)
Notes
Diffstat (limited to 'test/SemaOpenCL/storageclass.cl')
-rw-r--r--test/SemaOpenCL/storageclass.cl5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/SemaOpenCL/storageclass.cl b/test/SemaOpenCL/storageclass.cl
index e611313b4a70..9a461068f237 100644
--- a/test/SemaOpenCL/storageclass.cl
+++ b/test/SemaOpenCL/storageclass.cl
@@ -13,6 +13,11 @@ void kernel foo(int x) {
constant int L1 = 0;
local int L2;
+ if (true) {
+ local int L1; // expected-error {{variables in the local address space can only be declared in the outermost scope of a kernel function}}
+ constant int L1 = 42; // expected-error {{variables in the constant address space can only be declared in the outermost scope of a kernel function}}
+ }
+
auto int L3 = 7; // expected-error{{OpenCL version 1.2 does not support the 'auto' storage class specifier}}
global int L4; // expected-error{{function scope variable cannot be declared in global address space}}
__attribute__((address_space(100))) int L5; // expected-error{{automatic variable qualified with an invalid address space}}