| 1 |
// Test parsing of #pragma omp declare variant |
| 2 |
// { dg-do compile { target c++11 } } |
| 3 |
// { dg-additional-options "-fdump-tree-gimple" } |
| 4 |
|
| 5 |
constexpr int score (int x) { return x; } |
| 6 |
void f0 (); |
| 7 |
#pragma omp declare variant (f0) match (user={condition(score(1))}) |
| 8 |
void f1 (); |
| 9 |
void f2 (); |
| 10 |
#pragma omp declare variant (f2) match (user={condition(score(1):1)}) |
| 11 |
void f3 (); |
| 12 |
void f4 (); |
| 13 |
#pragma omp declare variant (f4) match (user={condition(score(1):score(1))}) |
| 14 |
void f5 (); |
| 15 |
void f6 (); |
| 16 |
#pragma omp declare variant (f6) match (user={condition(score(1)==0)}) |
| 17 |
void f7 (); |
| 18 |
|
| 19 |
void |
| 20 |
test () |
| 21 |
{ |
| 22 |
f1 (); // { dg-final { scan-tree-dump-times "f0 \\\(\\\);" 1 "gimple" } } |
| 23 |
f3 (); // { dg-final { scan-tree-dump-times "f2 \\\(\\\);" 1 "gimple" } } |
| 24 |
f5 (); // { dg-final { scan-tree-dump-times "f4 \\\(\\\);" 1 "gimple" } } |
| 25 |
f7 (); // { dg-final { scan-tree-dump-times "f7 \\\(\\\);" 1 "gimple" } } |
| 26 |
} |