Add 'libgomp.oacc-fortran/allocatable-array-1.f90'
libgomp/ * testsuite/libgomp.oacc-fortran/allocatable-array-1.f90: New file. From-SVN: r272448
This commit is contained in:
parent
4017da8d1c
commit
6652161ef3
|
@ -1,3 +1,8 @@
|
||||||
|
2019-06-18 Cesar Philippidis <cesar@codesourcery.com>
|
||||||
|
|
||||||
|
* testsuite/libgomp.oacc-fortran/allocatable-array-1.f90: New
|
||||||
|
file.
|
||||||
|
|
||||||
2019-06-18 Thomas Schwinge <thomas@codesourcery.com>
|
2019-06-18 Thomas Schwinge <thomas@codesourcery.com>
|
||||||
|
|
||||||
PR fortran/90743
|
PR fortran/90743
|
||||||
|
|
|
@ -0,0 +1,27 @@
|
||||||
|
! { dg-do run }
|
||||||
|
|
||||||
|
program main
|
||||||
|
integer, parameter :: n = 40
|
||||||
|
integer, allocatable :: ar(:,:,:)
|
||||||
|
integer :: i
|
||||||
|
|
||||||
|
allocate (ar(1:n,0:n-1,0:n-1))
|
||||||
|
!$acc enter data copyin (ar)
|
||||||
|
|
||||||
|
!$acc update host (ar)
|
||||||
|
|
||||||
|
!$acc update device (ar)
|
||||||
|
|
||||||
|
call update_ar (ar, n)
|
||||||
|
|
||||||
|
!$acc exit data copyout (ar)
|
||||||
|
end program main
|
||||||
|
|
||||||
|
subroutine update_ar (ar, n)
|
||||||
|
integer :: n
|
||||||
|
integer, dimension (1:n,0:n-1,0:n-1) :: ar
|
||||||
|
|
||||||
|
!$acc update host (ar)
|
||||||
|
|
||||||
|
!$acc update device (ar)
|
||||||
|
end subroutine update_ar
|
Loading…
Reference in New Issue