| 1 |
// { dg-skip-if "c++98 does not support attributes" { c++98_only } } |
| 2 |
|
| 3 |
[[omp::decl (declare target, indirect(1))]] // { dg-error "directive with only 'device_type' or 'indirect' clause" } |
| 4 |
int f (void) { return 5; } |
| 5 |
|
| 6 |
[[omp::decl (declare target indirect)]] // { dg-error "directive with only 'device_type' or 'indirect' clause" } |
| 7 |
int g (void) { return 8; } |
| 8 |
|
| 9 |
[[omp::directive (begin declare target, indirect)]]; |
| 10 |
int h (void) { return 11; } |
| 11 |
[[omp::directive (end declare target)]]; |
| 12 |
|
| 13 |
int i (void) { return 8; } |
| 14 |
[[omp::directive (declare target to(i), indirect (1))]]; |
| 15 |
|
| 16 |
int j (void) { return 11; } |
| 17 |
[[omp::directive (declare target indirect enter (j))]]; |