diff options
author | Cesar Philippidis <cesar@codesourcery.com> | 2019-06-18 15:14:34 -0700 |
---|---|---|
committer | Thomas Schwinge <tschwinge@gcc.gnu.org> | 2019-06-19 00:14:34 +0200 |
commit | 6652161ef3293e7c9d3ed6690a3e1c869424185f (patch) | |
tree | f1a8eb20bcc0ee35c9ad49a85a8651e3f2089741 /libgomp | |
parent | 4017da8d1ccc205b51ad4dbfcb63b799ad9c9a51 (diff) | |
download | gcc-6652161ef3293e7c9d3ed6690a3e1c869424185f.zip gcc-6652161ef3293e7c9d3ed6690a3e1c869424185f.tar.gz gcc-6652161ef3293e7c9d3ed6690a3e1c869424185f.tar.bz2 |
Add 'libgomp.oacc-fortran/allocatable-array-1.f90'
libgomp/
* testsuite/libgomp.oacc-fortran/allocatable-array-1.f90: New
file.
From-SVN: r272448
Diffstat (limited to 'libgomp')
-rw-r--r-- | libgomp/ChangeLog | 5 | ||||
-rw-r--r-- | libgomp/testsuite/libgomp.oacc-fortran/allocatable-array-1.f90 | 27 |
2 files changed, 32 insertions, 0 deletions
diff --git a/libgomp/ChangeLog b/libgomp/ChangeLog index 62c4582..bd57e38 100644 --- a/libgomp/ChangeLog +++ b/libgomp/ChangeLog @@ -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> PR fortran/90743 diff --git a/libgomp/testsuite/libgomp.oacc-fortran/allocatable-array-1.f90 b/libgomp/testsuite/libgomp.oacc-fortran/allocatable-array-1.f90 new file mode 100644 index 0000000..c9a7638 --- /dev/null +++ b/libgomp/testsuite/libgomp.oacc-fortran/allocatable-array-1.f90 @@ -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 |