blob: 1b400fbfb3376952dbfd73aa69f5779e80db41b5 [file] [log] [blame]
/* { dg-do compile } */
/* { dg-options "-O2 -ftree-parallelize-loops=4 -fdump-tree-parloops2-details -fdump-tree-optimized" } */
void abort (void);
void parloop (int N)
{
int i;
int x[10000990];
for (i = 0; i < N; i++)
x[i] = i + 3;
for (i = 0; i < N; i++)
{
if (x[i] != i + 3)
abort ();
}
}
int main(void)
{
parloop(10000);
return 0;
}
/* Check that the first loop in parloop got parallelized. */
/* { dg-final { scan-tree-dump-times "SUCCESS: may be parallelized" 1 "parloops2" } } */
/* { dg-final { scan-tree-dump-times "loopfn" 4 "optimized" } } */