testsuite: Skip analyzer tests on AIX.
[official-gcc.git] / gcc / testsuite / c-c++-common / goacc-gomp / pr93465-1.c
blobc8b9135d9973bea3cb696dd089eef33df6cb8df3
1 #pragma omp declare target
2 #pragma acc routine seq /* { dg-error "cannot apply '#pragma acc routine' to '\(void \)?f1\(\\(\\)\)?', which has also been marked with an OpenMP 'declare target' directive" } */
3 void f1 (void) {}
4 #pragma omp end declare target
6 #pragma omp declare target
7 void f1 (void);
9 #pragma acc routine seq /* { dg-error "cannot apply '#pragma acc routine' to '\(void \)?f1\(\\(\\)\)?', which has also been marked with an OpenMP 'declare target' directive" } */
10 void f1 (void);
14 #pragma omp declare target
15 #pragma acc routine /* { dg-error "cannot apply '#pragma acc routine' to '\(void \)?f2\(\\(\\)\)?', which has also been marked with an OpenMP 'declare target' directive" } */
16 extern void f2 (void);
17 #pragma omp end declare target
19 #pragma omp declare target
20 extern void f2 (void);
21 #pragma omp end declare target
23 #pragma acc routine gang /* { dg-error "cannot apply '#pragma acc routine' to '\(void \)?f2\(\\(\\)\)?', which has also been marked with an OpenMP 'declare target' directive" } */
24 extern void f2 (void);
27 #pragma omp declare target
28 #pragma acc routine gang /* { dg-error "cannot apply '#pragma acc routine' to '\(void \)?f3\(\\(\\)\)?', which has also been marked with an OpenMP 'declare target' directive" } */
29 void f3 (void);
30 #pragma omp end declare target
32 #pragma omp declare target
33 void f3 (void) {}
34 #pragma omp end declare target
36 #pragma acc routine (f3) gang /* { dg-error "cannot apply '#pragma acc routine' to '\(void \)?f3\(\\(\\)\)?', which has also been marked with an OpenMP 'declare target' directive" } */
39 /* Surprisingly, this diagnosis also works for '#pragma acc routine' first,
40 followed by '#pragma omp declare target'; the latter gets applied first. */
43 #pragma acc routine /* { dg-error "cannot apply '#pragma acc routine' to '\(void \)?f4\(\\(\\)\)?', which has also been marked with an OpenMP 'declare target' directive" } */
44 extern void f4 (void);
46 #pragma omp declare target
47 extern void f4 (void);
48 #pragma omp end declare target
51 #pragma acc routine gang /* { dg-error "cannot apply '#pragma acc routine' to '\(void \)?f5\(\\(\\)\)?', which has also been marked with an OpenMP 'declare target' directive" } */
52 void f5 (void) {}
54 #pragma omp declare target
55 extern void f5 (void);
56 #pragma omp end declare target