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" } */
4 #pragma omp end declare target
6 #pragma omp declare target
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" } */
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" } */
30 #pragma omp end declare target
32 #pragma omp declare target
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" } */
54 #pragma omp declare target
55 extern void f5 (void);
56 #pragma omp end declare target