Skip gnat.dg/prot7.adb on hppa.
[official-gcc.git] / libgomp / testsuite / libgomp.c / pr39591-3.c
blob590553437ea0c9a3c9052f63160a52ad23326301
1 /* PR other/39591 */
2 /* { dg-do run } */
4 extern void abort (void);
6 int e, a[40];
8 void __attribute__((noinline))
9 foo (int *array)
11 #pragma omp task
13 int j;
14 for (j = 0; j < 40; j++)
15 if (array[j] != 0x55555555)
16 #pragma omp atomic
17 e++;
21 int
22 main (void)
24 int k;
25 for (k = 0; k < sizeof a / sizeof a[0]; k++)
26 a[k] = 0x55555555;
28 #pragma omp parallel
30 int i;
32 #pragma omp for schedule (dynamic)
33 for (i = 0; i < 50; i++)
34 foo (a);
36 if (e)
37 abort ();
38 return 0;