Skip gnat.dg/prot7.adb on hppa.
[official-gcc.git] / libgomp / testsuite / libgomp.c-c++-common / taskwait-depend-nowait-1.c
blob3d1519ee70a559efe78d59d597f86be02b77c712
1 #ifdef __cplusplus
2 extern "C"
3 #endif
4 void abort (void);
6 int
7 main ()
9 int a[64], b = 1;
10 #pragma omp parallel num_threads (4)
11 #pragma omp single
13 int i;
14 #pragma omp taskwait depend(in: a) nowait
15 #pragma omp taskwait depend(in: a) nowait
16 #pragma omp taskwait
17 #pragma omp taskgroup
19 #pragma omp taskwait depend(in: a) nowait
20 #pragma omp taskwait depend(in: a) nowait
22 for (i = 0; i < 64; ++i)
23 #pragma omp task depend(in: a) shared(a)
24 a[i] = i;
25 #pragma omp taskwait depend(inout: a) nowait
26 for (i = 0; i < 64; ++i)
27 #pragma omp task depend(inoutset: a) shared(a)
28 if (a[i] != i)
29 abort ();
30 else
31 a[i] = 2 * i + 1;
32 #pragma omp taskwait nowait depend(out: a) depend(in: b)
33 #pragma omp taskwait depend(inout: b)
34 for (i = 0; i < 64; ++i)
35 if (a[i] != 2 * i + 1)
36 abort ();
38 return 0;