blob: d2678f2010d9e917307d215b9aef79c73d6c21f6 [file] [log] [blame]
Tanya Lattner5e94d6f2012-06-19 23:09:52 +00001// RUN: %clang_cc1 %s -verify -pedantic -fsyntax-only -cl-std=CL1.2
2
Joey Gouly68bb7a62013-01-24 15:24:54 +00003static constant int A = 0;
Tanya Lattner5e94d6f2012-06-19 23:09:52 +00004
Tanya Lattner8aa86d12013-04-05 20:14:50 +00005int X = 0; // expected-error{{global variables must have a constant address space qualifier}}
6
Tanya Lattner5e94d6f2012-06-19 23:09:52 +00007// static is not allowed at local scope.
8void kernel foo() {
9 static int X = 5; // expected-error{{variables in function scope cannot be declared static}}
10 auto int Y = 7; // expected-error{{OpenCL does not support the 'auto' storage class specifier}}
11}
12
13static void kernel bar() { // expected-error{{kernel functions cannot be declared static}}
14}