27 lines
574 B
Fortran
Raw Normal View History

2015-08-28 17:33:40 +02:00
! { dg-do run }
2019-06-02 17:48:37 +02:00
! { dg-options "-std=legacy" }
2015-08-28 17:33:40 +02:00
program collapse2
integer :: i, j, k, a(1:3, 4:6, 5:7)
logical :: l
l = .false.
a(:, :, :) = 0
!$acc parallel
!$acc loop collapse(4 - 1)
do 164 i = 1, 3
do 164 j = 4, 6
do 164 k = 5, 7
a(i, j, k) = i + j + k
164 end do
!$acc loop collapse(2) reduction(.or.:l)
firstdo: do i = 1, 3
do j = 4, 6
do k = 5, 7
if (a(i, j, k) .ne. (i + j + k)) l = .true.
end do
end do
end do firstdo
!$acc end parallel
2018-12-28 16:30:48 +01:00
if (l) STOP 1
2015-08-28 17:33:40 +02:00
end program collapse2