2015-11-18 Steven G. Kargl <kargl@gcc.gnu.org>
[official-gcc.git] / libgomp / testsuite / libgomp.fortran / depend-2.f90
blob0694ce742063c1f243e0ce8a0b43658c0745a34c
1 ! { dg-do run }
3 integer :: x(3:6, 7:12), y
4 y = 1
5 !$omp parallel shared (x, y)
6 !$omp single
7 !$omp taskgroup
8 !$omp task depend(in: x(:, :))
9 if (y.ne.1) call abort
10 !$omp end task
11 !$omp task depend(out: x(:, :))
12 y = 2
13 !$omp end task
14 !$omp end taskgroup
15 !$omp taskgroup
16 !$omp task depend(in: x(4, 7))
17 if (y.ne.2) call abort
18 !$omp end task
19 !$omp task depend(out: x(4:4, 7:7))
20 y = 3
21 !$omp end task
22 !$omp end taskgroup
23 !$omp taskgroup
24 !$omp task depend(in: x(4:, 8:))
25 if (y.ne.3) call abort
26 !$omp end task
27 !$omp task depend(out: x(4:6, 8:12))
28 y = 4
29 !$omp end task
30 !$omp end taskgroup
31 !$omp end single
32 !$omp end parallel
33 if (y.ne.4) call abort
34 end