| 1 |
/* { dg-do compile } */ |
| 2 |
|
| 3 |
/* This test used to ICE in C and only diagnose the first error in C++. */ |
| 4 |
|
| 5 |
struct s { |
| 6 |
int a, b; |
| 7 |
}; |
| 8 |
|
| 9 |
void f (int aa, int bb) |
| 10 |
{ |
| 11 |
struct s s1, s2; |
| 12 |
s1.a = aa; |
| 13 |
s1.b = bb; |
| 14 |
s2.a = aa + 1; |
| 15 |
s2.b = bb + 1; |
| 16 |
|
| 17 |
/* A struct is not a valid argument for the condition selector. */ |
| 18 |
#pragma omp metadirective when(user={condition(s1)} : nothing) otherwise(nothing) /* { dg-error "property must be integer expression" } */ |
| 19 |
#pragma omp metadirective when(user={condition(s2)} : nothing) otherwise(nothing) /* { dg-error "property must be integer expression" } */ |
| 20 |
} |