| 1 |
/* { dg-do compile { target { c || c++11 } } } */ |
| 2 |
/* { dg-additional-options "-std=c23" { target c } } */ |
| 3 |
/* { dg-additional-options "-O2 -fdump-tree-original -fdump-tree-gimple -fdump-tree-cunroll" } */ |
| 4 |
|
| 5 |
extern void dummy (int); |
| 6 |
|
| 7 |
void |
| 8 |
test1 (void) |
| 9 |
{ |
| 10 |
[[omp::directive (unroll full)]] |
| 11 |
for (int i = 0; i < 10; i++) |
| 12 |
dummy (i); |
| 13 |
} |
| 14 |
|
| 15 |
/* Loop should be removed with 10 copies of the body remaining */ |
| 16 |
/* { dg-final { scan-tree-dump-times "dummy" 10 "cunroll" } } */ |
| 17 |
/* { dg-final { scan-tree-dump "#pragma omp unroll" "original" } } */ |
| 18 |
/* { dg-final { scan-tree-dump-not "#pragma omp" "gimple" } } */ |