C99 testsuite readiness: Compile more tests with -std=gnu89
[official-gcc.git] / gcc / testsuite / g++.dg / gomp / attrs-12.C
blobb613872952e6df89b336b8fd94e56b03a7288733
1 // { dg-do compile { target c++11 } }
3 #pragma omp declare target
4 #pragma omp declare target
5 [[omp::directive (declare target)]];
6 int a;
7 [[omp::directive (end declare target)]];
8 #pragma omp end declare target
9 #pragma omp end declare target
10 [[omp::directive (declare target)]];
11 int b;
12 #pragma omp end declare target          // { dg-error "'declare target' in attribute syntax terminated with 'end declare target' in pragma syntax" }
13 #pragma omp declare target
14 int c;
15 [[omp::directive (end declare target)]];// { dg-error "'declare target' in pragma syntax terminated with 'end declare target' in attribute syntax" }
16 #pragma omp declare target
17 [[omp::directive (declare target)]];
18 int d;
19 #pragma omp end declare target          // { dg-error "'declare target' in attribute syntax terminated with 'end declare target' in pragma syntax" }
20 #pragma omp declare target
21 int e;
22 [[omp::directive (end declare target)]];// { dg-error "'declare target' in pragma syntax terminated with 'end declare target' in attribute syntax" }
23 #pragma omp end declare target
24 [[omp::directive (declare target)]];
25 [[omp::directive (declare target)]];
26 int f;
27 #pragma omp end declare target          // { dg-error "'declare target' in attribute syntax terminated with 'end declare target' in pragma syntax" }
28 #pragma omp declare target
29 int g;
30 [[omp::directive (end declare target)]];// { dg-error "'declare target' in pragma syntax terminated with 'end declare target' in attribute syntax" }
31 [[omp::directive (end declare target)]];
32 [[omp::directive (declare target)]];
33 #pragma omp declare target
34 int h;
35 #pragma omp end declare target
36 #pragma omp end declare target          // { dg-error "'declare target' in attribute syntax terminated with 'end declare target' in pragma syntax" }
37 #pragma omp declare target
38 [[omp::directive (declare target)]];
39 int i;
40 [[omp::directive (end declare target)]];
41 [[omp::directive (end declare target)]];// { dg-error "'declare target' in pragma syntax terminated with 'end declare target' in attribute syntax" }