etc/services - sync with NetBSD-8
[minix.git] / external / bsd / llvm / dist / clang / test / SemaOpenCL / invalid-kernel.cl
blob9a50673ecdfaebdea141f0ab36f78135fa2a4306
1 // RUN: %clang_cc1 -verify %s
3 kernel void no_ptrptr(global int **i) { } // expected-error{{kernel parameter cannot be declared as a pointer to a pointer}}
5 __kernel void no_privateptr(__private int *i) { } // expected-error {{kernel parameter cannot be declared as a pointer to the __private address space}}
7 __kernel void no_privatearray(__private int i[]) { } // expected-error {{kernel parameter cannot be declared as a pointer to the __private address space}}
9 kernel int bar() { // expected-error {{kernel must have void return type}}
10 return 6;
13 kernel void main() { // expected-error {{kernel cannot be called 'main'}}
17 int main() { // expected-error {{function cannot be called 'main'}}
18 return 0;
21 int* global x(int* x) { // expected-error {{return value cannot be qualified with address space}}
22 return x + 1;
25 int* local x(int* x) { // expected-error {{return value cannot be qualified with address space}}
26 return x + 1;
29 int* constant x(int* x) { // expected-error {{return value cannot be qualified with address space}}
30 return x + 1;