gcc/libgomp/testsuite/libgomp.oacc-fortran/multidim-slice.f95
Julian Brown 02817027ca OpenACC 2.6 deep copy: Fortran execution tests
libgomp/
	* testsuite/libgomp.oacc-fortran/deep-copy-1.f90: New test.
	* testsuite/libgomp.oacc-fortran/deep-copy-2.f90: New test.
	* testsuite/libgomp.oacc-fortran/deep-copy-3.f90: New test.
	* testsuite/libgomp.oacc-fortran/deep-copy-4.f90: New test.
	* testsuite/libgomp.oacc-fortran/deep-copy-5.f90: New test.
	* testsuite/libgomp.oacc-fortran/deep-copy-6.f90: New test.
	* testsuite/libgomp.oacc-fortran/deep-copy-7.f90: New test.
	* testsuite/libgomp.oacc-fortran/deep-copy-8.f90: New test.
	* testsuite/libgomp.oacc-fortran/derived-type-1.f90: New test.
	* testsuite/libgomp.oacc-fortran/derivedtype-1.f95: New test.
	* testsuite/libgomp.oacc-fortran/derivedtype-2.f95: New test.
	* testsuite/libgomp.oacc-fortran/multidim-slice.f95: New test.
	* testsuite/libgomp.oacc-fortran/update-2.f90: New test.

Co-Authored-By: Cesar Philippidis <cesar@codesourcery.com>

From-SVN: r279630
2019-12-20 01:39:46 +00:00

51 lines
909 B
Fortran

! { dg-do run }
program main
implicit none
real, allocatable :: myarr(:,:,:,:,:)
integer i, j, k, l, m
allocate(myarr(1:10,1:10,1:10,1:10,1:10))
do i=1,10
do j=1,10
do k=1,10
do l=1,10
do m=1,10
myarr(m,l,k,j,i) = i+j+k+l+m
end do
end do
end do
end do
end do
do i=1,10
!$acc data copy(myarr(:,:,:,:,i))
!$acc parallel loop collapse(4) present(myarr(:,:,:,:,i))
do j=1,10
do k=1,10
do l=1,10
do m=1,10
myarr(m,l,k,j,i) = myarr(m,l,k,j,i) + 1
end do
end do
end do
end do
!$acc end parallel loop
!$acc end data
end do
do i=1,10
do j=1,10
do k=1,10
do l=1,10
do m=1,10
if (myarr(m,l,k,j,i) .ne. i+j+k+l+m+1) stop 1
end do
end do
end do
end do
end do
end program main