blob: 35dbf4fc159695e893cbd402641045cd96c16e0a [file] [log] [blame]
/* { dg-do compile { target { c || c++11 } } } */
/* { dg-additional-options "-std=c23" { target c } } */
/* { dg-additional-options "-O2 -fdump-tree-original -fdump-tree-gimple -fdump-tree-cunroll" } */
extern void dummy (int);
void
test1 (void)
{
[[omp::directive (unroll full)]]
for (int i = 0; i < 10; i++)
dummy (i);
}
/* Loop should be removed with 10 copies of the body remaining */
/* { dg-final { scan-tree-dump-times "dummy" 10 "cunroll" } } */
/* { dg-final { scan-tree-dump "#pragma omp unroll" "original" } } */
/* { dg-final { scan-tree-dump-not "#pragma omp" "gimple" } } */