Skip gnat.dg/prot7.adb on hppa.
[official-gcc.git] / libgomp / testsuite / libgomp.oacc-fortran / collapse-7.f90
blob9c13c79651b430924093ce8d24c9ba1c2850fd5a
1 ! { dg-do run }
3 ! collapse3.f90:test4
4 program collapse7
5 integer :: i, j, k, a(1:7, -3:5, 12:19), b(1:7, -3:5, 12:19)
6 logical :: l, r
7 l = .false.
8 r = .false.
9 a(:, :, :) = 0
10 b(:, :, :) = 0
11 !$acc parallel
12 !$acc loop collapse (3) reduction (.or.:l)
13 do i = 2, 6
14 do j = -2, 4
15 do k = 13, 18
16 l = l.or.i.lt.2.or.i.gt.6.or.j.lt.-2.or.j.gt.4
17 l = l.or.k.lt.13.or.k.gt.18
18 if (.not.l) a(i, j, k) = a(i, j, k) + 1
19 end do
20 end do
21 end do
22 !$acc end parallel
23 do i = 2, 6
24 do j = -2, 4
25 do k = 13, 18
26 r = r.or.i.lt.2.or.i.gt.6.or.j.lt.-2.or.j.gt.4
27 r = r.or.k.lt.13.or.k.gt.18
28 if (.not.r) b(i, j, k) = b(i, j, k) + 1
29 end do
30 end do
31 end do
32 if (l .neqv. r) STOP 1
33 do i = 1, 7
34 do j = -3, 5
35 do k = 12, 19
36 if (a(i, j, k) .ne. b(i, j, k)) STOP 2
37 end do
38 end do
39 end do
40 end program collapse7