1 // RUN: %clang_cc1 -verify %s 2 3 kernel void no_ptrptr(global int **i) { } // expected-error{{kernel parameter cannot be declared as a pointer to a pointer}} 4 5 __kernel void no_privateptr(__private int *i) { } // expected-error {{kernel parameter cannot be declared as a pointer to the __private address space}} 6 7 __kernel void no_privatearray(__private int i[]) { } // expected-error {{kernel parameter cannot be declared as a pointer to the __private address space}} 8 9 kernel int bar() { // expected-error {{kernel must have void return type}} 10 return 6; 11 } 12 13 kernel void main() { // expected-error {{kernel cannot be called 'main'}} 14 15 } 16 17 int main() { // expected-error {{function cannot be called 'main'}} 18 return 0; 19 } 20 21 int* global x(int* x) { // expected-error {{return value cannot be qualified with address space}} 22 return x + 1; 23 } 24 25 int* local x(int* x) { // expected-error {{return value cannot be qualified with address space}} 26 return x + 1; 27 } 28 29 int* constant x(int* x) { // expected-error {{return value cannot be qualified with address space}} 30 return x + 1; 31 } 32