Fix build on sparc64-linux-gnu.
[official-gcc.git] / libgomp / testsuite / libgomp.fortran / workshare2.f90
blob655a450885e1b9c280063eebe98fb93b92f7884d
1 subroutine f1
2 integer a(20:50,70:90)
3 !$omp parallel workshare
4 a(:,:) = 17
5 !$omp end parallel workshare
6 if (any (a.ne.17)) STOP 1
7 end subroutine f1
8 subroutine f2
9 integer a(20:50,70:90),d(15),e(15),f(15)
10 integer b, c, i
11 !$omp parallel workshare
12 c = 5
13 a(:,:) = 17
14 b = 4
15 d = (/ 0, 1, 2, 3, 4, 0, 6, 7, 8, 9, 10, 0, 0, 13, 14 /)
16 forall (i=1:15, d(i) /= 0)
17 d(i) = 0
18 end forall
19 e = (/ 4, 5, 2, 6, 4, 5, 2, 6, 4, 5, 2, 6, 4, 5, 2 /)
20 f = 7
21 where (e.ge.5) f = f + 1
22 !$omp end parallel workshare
23 if (any (a.ne.17)) STOP 2
24 if (c.ne.5.or.b.ne.4) STOP 3
25 if (any(d.ne.0)) STOP 4
26 do i = 1, 15
27 if (e(i).ge.5) then
28 if (f(i).ne.8) STOP 5
29 else
30 if (f(i).ne.7) STOP 6
31 end if
32 end do
33 end subroutine f2
35 call f1
36 call f2
37 end