| 1 |
// Test parsing of #pragma omp declare variant |
| 2 |
// { dg-do compile } |
| 3 |
|
| 4 |
void f01 (); |
| 5 |
#pragma omp declare variant (f01) match (user={condition((T) 1)}) // { dg-error "property must be constant integer expression" } |
| 6 |
template <typename T> |
| 7 |
void f02 (); |
| 8 |
void f03 (); |
| 9 |
#pragma omp declare variant (f03) match (user={condition(score((T) 1):1)}) // { dg-error "score argument must be constant integer expression" } |
| 10 |
template <typename T> |
| 11 |
void f04 (); |
| 12 |
void f05 (); |
| 13 |
#pragma omp declare variant (f05) match (user={condition(score(N):1)}) // { dg-error "score argument must be non-negative" } |
| 14 |
template <int N> |
| 15 |
void f06 (); |
| 16 |
void f07 (); |
| 17 |
#pragma omp declare variant (f05) match (user={condition(score(N):1)}) |
| 18 |
template <int N> |
| 19 |
void f08 (); |
| 20 |
|
| 21 |
void |
| 22 |
test () |
| 23 |
{ |
| 24 |
f02 <double> (); |
| 25 |
f04 <float> (); |
| 26 |
f06 <-1> (); |
| 27 |
f08 <0> (); |
| 28 |
} |