! Exercise the auto, independent, seq and tile loop clauses inside
! parallel regions.
! { dg-do run }
program loops
integer, parameter :: n = 20, c = 10
integer :: i, a(n), b(n)
a(:) = 0
b(:) = 0
! COPY
!$acc parallel copy (a)
!$acc loop auto
do i = 1, n
a(i) = i
end do
!$acc end parallel
b(i) = i
call check (a, b, n)
! COPYOUT
!$acc parallel copyout (a)
!$acc loop independent
if (a(i) .ne. b(i)) stop 1
! COPYIN
!$acc parallel copyout (a) copyin (b)
!$acc loop seq
! PRESENT_OR_COPY
!$acc parallel pcopy (a)
!$acc loop tile (*)
end program loops
subroutine check (a, b, n)
integer :: n, a(n), b(n)
integer :: i
if (a(i) .ne. b(i)) stop 2
end subroutine check