Skip gnat.dg/prot7.adb on hppa.
[official-gcc.git] / libgomp / testsuite / libgomp.graphite / force-parallel-5.c
blobde31d6436f5d2959e61413fdb42c2f78eee92713
1 /* Triangle loops. */
2 void abort (void);
4 #define N 500
6 void foo(void)
8 int i,j;
9 int A[3*N], B[3*N];
11 for (i = 0; i < 3*N; i++)
12 B[i] = A[i] = i;
14 for (i = 1; i < N; i++)
15 for (j = 1; j < i; j++)
16 /* This loop carried no dependency, it fails
17 at code generation part.*/
18 A[j+N] = A[j] + j;
20 for (i = 1; i < N; i++)
21 for (j = 1; j < i; j++)
22 if (A[j+N] != B[j] + j)
23 abort();
26 int main(void)
28 foo();
30 return 0;
33 /* Check that parallel code generation part make the right answer. */
34 /* { dg-final { scan-tree-dump-times "2 loops carried no dependency" 1 "graphite" } } */
35 /* { dg-final { scan-tree-dump-times "loopfn.0" 4 "optimized" } } */
36 /* { dg-final { scan-tree-dump-times "loopfn.1" 4 "optimized" } } */