2012-06-20 07:09:52 +08:00
|
|
|
// RUN: %clang_cc1 %s -verify -pedantic -fsyntax-only -cl-std=CL1.2
|
|
|
|
|
2013-01-24 23:24:54 +08:00
|
|
|
static constant int A = 0;
|
2012-06-20 07:09:52 +08:00
|
|
|
|
2013-04-06 04:14:50 +08:00
|
|
|
int X = 0; // expected-error{{global variables must have a constant address space qualifier}}
|
|
|
|
|
2012-06-20 07:09:52 +08:00
|
|
|
// static is not allowed at local scope.
|
|
|
|
void kernel foo() {
|
|
|
|
static int X = 5; // expected-error{{variables in function scope cannot be declared static}}
|
|
|
|
auto int Y = 7; // expected-error{{OpenCL does not support the 'auto' storage class specifier}}
|
|
|
|
}
|
|
|
|
|
|
|
|
static void kernel bar() { // expected-error{{kernel functions cannot be declared static}}
|
|
|
|
}
|