Debian Codegraph @

gcc/testsuite/c-c++-common/goacc/self-clause-1.c

raw
1 /* See also 'if-clause-1.c'. */
2
3 void
4 f (int b)
5 {
6 struct { int i; } *p;
7
8 #pragma acc parallel self(0) self(b) /* { dg-error "too many 'self' clauses" } */
9 ;
10 #pragma acc parallel self self(b) /* { dg-error "too many 'self' clauses" } */
11 ;
12 #pragma acc parallel self(*p)
13 /* { dg-error {used struct type value where scalar is required} {} { target c } .-1 }
14 { dg-error {could not convert '\* p' from 'f\(int\)::<unnamed struct>' to 'bool'} {} { target c++ } .-2 } */
15 ;
16
17 #pragma acc kernels self(0) self(b) /* { dg-error "too many 'self' clauses" } */
18 ;
19 #pragma acc kernels self self(b) /* { dg-error "too many 'self' clauses" } */
20 ;
21 #pragma acc kernels self(*p)
22 /* { dg-error {used struct type value where scalar is required} {} { target c } .-1 }
23 { dg-error {could not convert '\* p' from 'f\(int\)::<unnamed struct>' to 'bool'} {} { target c++ } .-2 } */
24 ;
25
26 #pragma acc serial self(0) self(b) /* { dg-error "too many 'self' clauses" } */
27 ;
28 #pragma acc serial self self(b) /* { dg-error "too many 'self' clauses" } */
29 ;
30 #pragma acc serial self(*p)
31 /* { dg-error {used struct type value where scalar is required} {} { target c } .-1 }
32 { dg-error {could not convert '\* p' from 'f\(int\)::<unnamed struct>' to 'bool'} {} { target c++ } .-2 } */
33 ;
34 }