| 1 |
/* { dg-do compile } */ |
| 2 |
|
| 3 |
/* Check that the OpenMP 5.1 syntax with commas after the directive name and |
| 4 |
between clauses is supported. */ |
| 5 |
|
| 6 |
int f (int a, void *b, float c[2]); |
| 7 |
|
| 8 |
#pragma omp declare variant (f), match (construct={dispatch}), adjust_args (nothing: a), adjust_args (need_device_ptr: b, c) |
| 9 |
int f0 (int a, void *b, float c[2]); |
| 10 |
|
| 11 |
int test () { |
| 12 |
int a; |
| 13 |
void *b; |
| 14 |
float c[2]; |
| 15 |
struct {int a;} s; |
| 16 |
|
| 17 |
#pragma omp dispatch, novariants(0), nocontext(1) |
| 18 |
s.a = f0 (a, b, c); |
| 19 |
|
| 20 |
return s.a; |
| 21 |
} |