| 1 |
// { dg-do compile { target c++11 } } |
| 2 |
|
| 3 |
int n1 = 0, n2 = 42; |
| 4 |
[[omp::sequence (directive (requires, atomic_default_mem_order (seq_cst)))]]; |
| 5 |
[[omp::directive (declare reduction (plus: int: omp_out += omp_in) initializer (omp_priv = 0))]]; |
| 6 |
int a; |
| 7 |
[[omp::directive (declare target (a))]]; |
| 8 |
int t; |
| 9 |
[[omp::sequence (omp::directive (threadprivate (t)))]]; |
| 10 |
int b, c, e; |
| 11 |
[[omp::directive (declare target, to (b), link (c), enter (e))]]; |
| 12 |
[[omp::directive (declare target)]]; |
| 13 |
[[omp::directive (declare target)]]; |
| 14 |
int d; |
| 15 |
[[omp::directive (end declare target)]]; |
| 16 |
[[omp::directive (end declare target)]]; |
| 17 |
[[omp::directive (begin declare target, device_type (any))]]; |
| 18 |
[[omp::directive (begin declare target)]]; |
| 19 |
int f; |
| 20 |
[[omp::directive (end declare target)]]; |
| 21 |
[[omp::directive (end declare target)]]; |
| 22 |
[[omp::directive (begin declare target device_type (host))]]; |
| 23 |
[[omp::directive (declare target)]]; |
| 24 |
int g; |
| 25 |
[[omp::directive (end declare target)]]; |
| 26 |
[[omp::directive (end declare target)]]; |
| 27 |
[[omp::directive (declare target)]]; |
| 28 |
[[omp::directive (begin declare target, device_type (nohost))]]; |
| 29 |
int h; |
| 30 |
[[omp::directive (end declare target)]]; |
| 31 |
[[omp::directive (end declare target)]]; |
| 32 |
[[omp::directive (nothing)]]; |
| 33 |
[[omp::directive (begin assumes no_openmp no_openmp_routines no_parallelism |
| 34 |
absent (atomic, barrier, cancel, cancellation point) |
| 35 |
absent (critical, depobj) |
| 36 |
absent (distribute, flush, loop, masked, master, nothing, ordered) |
| 37 |
absent (parallel, scan, scope, section, sections, simd, single, task) |
| 38 |
absent (taskgroup, taskloop, taskwait, taskyield) |
| 39 |
absent (target, teams, for, error) holds (n1 < n2))]]; |
| 40 |
void foo (void) {} |
| 41 |
[[omp::directive (end assumes)]]; |
| 42 |
[[omp::directive (begin assumes, no_openmp, no_openmp_routines, no_parallelism, |
| 43 |
absent (atomic, barrier, cancel, cancellation point), |
| 44 |
absent (critical, depobj), |
| 45 |
absent (distribute, flush, loop, masked, master, nothing, ordered), |
| 46 |
absent (parallel, scan, scope, section, sections, simd, single, task), |
| 47 |
absent (taskgroup, taskloop, taskwait, taskyield), |
| 48 |
absent (target, teams, for, error), holds (n1 < n2))]]; |
| 49 |
[[omp::directive (begin assumes no_openmp)]]; |
| 50 |
void bar (void) {} |
| 51 |
[[omp::sequence (omp::directive (end assumes), omp::directive (end assumes))]]; |