PR tree-optimization/84740
[official-gcc.git] / gcc / testsuite / gcc.dg / autopar / outer-1.c
blob6607ed054baa9c46902ab3781b076a4c374fb5d8
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -ftree-parallelize-loops=4 -fdump-tree-parloops2-details -fdump-tree-optimized" } */
4 void abort (void);
6 void parloop (int N)
8 int i, j;
9 int x[10000][10000];
11 for (i = 0; i < N; i++)
12 for (j = 0; j < N; j++)
13 x[i][j] = i + j + 3;
15 for (i = 0; i < N; i++)
16 for (j = 0; j < N; j++)
17 if (x[i][j] != i + j + 3)
18 abort ();
21 int main(void)
23 parloop(10000);
25 return 0;
29 /* Check that outer loop is parallelized. */
30 /* { dg-final { scan-tree-dump-times "parallelizing outer loop" 1 "parloops2" } } */
31 /* { dg-final { scan-tree-dump-times "loopfn" 4 "optimized" } } */