1 // RUN: %clang_cc1 %s -fopenacc -verify
15 // expected-error@+1{{expected pointer in 'deviceptr' clause, type is 'int'}}
16 #pragma acc parallel deviceptr(LocalInt)
19 // expected-error@+1{{OpenACC variable is not a valid variable name, sub-array, array element, member of a composite variable, or composite variable member}}
20 #pragma acc parallel deviceptr(&LocalInt)
23 #pragma acc serial deviceptr(LocalPtr)
26 // expected-error@+1{{expected pointer in 'deviceptr' clause, type is 'int[5]'}}
27 #pragma acc kernels deviceptr(Array)
30 // expected-error@+1{{expected pointer in 'deviceptr' clause, type is 'int'}}
31 #pragma acc parallel deviceptr(Array[0])
34 // expected-error@+2{{OpenACC sub-array is not allowed here}}
35 // expected-note@+1{{expected variable of pointer type}}
36 #pragma acc parallel deviceptr(Array[0:1])
39 // expected-error@+1{{expected pointer in 'deviceptr' clause, type is 'int *[5]'}}
40 #pragma acc parallel deviceptr(PtrArray)
43 #pragma acc parallel deviceptr(PtrArray[0])
46 // expected-error@+2{{OpenACC sub-array is not allowed here}}
47 // expected-note@+1{{expected variable of pointer type}}
48 #pragma acc parallel deviceptr(PtrArray[0:1])
51 // expected-error@+1{{expected pointer in 'deviceptr' clause, type is 'struct S'}}
52 #pragma acc parallel deviceptr(s)
55 // expected-error@+1{{expected pointer in 'deviceptr' clause, type is 'int'}}
56 #pragma acc parallel deviceptr(s.IntMem)
59 #pragma acc parallel deviceptr(s.PtrMem)
62 // expected-error@+1{{OpenACC 'deviceptr' clause is not valid on 'loop' directive}}
63 #pragma acc loop deviceptr(LocalInt)