1 // { dg-do compile { target c++11 } }
3 #pragma omp begin declare target
4 #pragma omp begin declare target device_type (any)
5 [[omp::directive (begin declare target, device_type (host))]];
7 [[omp::directive (end declare target)]];
8 #pragma omp end declare target
9 #pragma omp end declare target
10 [[omp::directive (begin declare target device_type (nohost))]];
12 #pragma omp end declare target // { dg-error "'begin declare target' in attribute syntax terminated with 'end declare target' in pragma syntax" }
13 #pragma omp begin declare target
15 [[omp::directive (end declare target)]];// { dg-error "'begin declare target' in pragma syntax terminated with 'end declare target' in attribute syntax" }
16 #pragma omp begin declare target device_type (host)
17 [[omp::directive (begin declare target)]];
19 #pragma omp end declare target // { dg-error "'begin declare target' in attribute syntax terminated with 'end declare target' in pragma syntax" }
20 #pragma omp begin declare target
22 [[omp::directive (end declare target)]];// { dg-error "'begin declare target' in pragma syntax terminated with 'end declare target' in attribute syntax" }
23 #pragma omp end declare target
24 [[omp::directive (begin declare target device_type (any))]];
25 [[omp::directive (begin declare target)]];
27 #pragma omp end declare target // { dg-error "'begin declare target' in attribute syntax terminated with 'end declare target' in pragma syntax" }
28 #pragma omp begin declare target
30 [[omp::directive (end declare target)]];// { dg-error "'begin declare target' in pragma syntax terminated with 'end declare target' in attribute syntax" }
31 [[omp::directive (end declare target)]];
32 [[omp::directive (begin declare target)]];
33 #pragma omp begin declare target
35 #pragma omp end declare target
36 #pragma omp end declare target // { dg-error "'begin declare target' in attribute syntax terminated with 'end declare target' in pragma syntax" }
37 #pragma omp begin declare target
38 [[omp::directive (begin declare target)]];
40 [[omp::directive (end declare target)]];
41 [[omp::directive (end declare target)]];// { dg-error "'begin declare target' in pragma syntax terminated with 'end declare target' in attribute syntax" }