1// RUN: %clang_cc1 -verify %s
2
3kernel 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
9kernel int bar()  { // expected-error {{kernel must have void return type}}
10  return 6;
11}
12
13kernel void main() { // expected-error {{kernel cannot be called 'main'}}
14
15}
16
17int main() { // expected-error {{function cannot be called 'main'}}
18  return 0;
19}
20
21int* global x(int* x) { // expected-error {{return value cannot be qualified with address space}}
22  return x + 1;
23}
24
25int* local x(int* x) { // expected-error {{return value cannot be qualified with address space}}
26  return x + 1;
27}
28
29int* constant x(int* x) { // expected-error {{return value cannot be qualified with address space}}
30  return x + 1;
31}
32