This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
[gomp4] Add Fortran runtime test
- From: James Norris <jnorris at codesourcery dot com>
- To: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Cc: <fortran at gcc dot gnu dot org>, Thomas Schwinge <thomas at codesourcery dot com>
- Date: Tue, 8 Dec 2015 17:24:37 -0600
- Subject: [gomp4] Add Fortran runtime test
- Authentication-results: sourceware.org; auth=none
Hi,
Add test to exercise the kernels construct with the
pcreate clause.
Committed to gomp-4_0-branch.
Jim
Index: libgomp/ChangeLog.gomp
===================================================================
--- libgomp/ChangeLog.gomp (revision 231430)
+++ libgomp/ChangeLog.gomp (working copy)
@@ -1,3 +1,7 @@
+2015-12-08 James Norris <jnorris@codesourcery.com>
+
+ * testsuite/libgomp.oacc-fortran/kernels-map-1.f90: Add new test.
+
2015-12-08 Thomas Schwinge <thomas@codesourcery.com>
James Norris <jnorris@codesourcery.com>
Index: libgomp/testsuite/libgomp.oacc-fortran/kernels-map-1.f90
===================================================================
--- libgomp/testsuite/libgomp.oacc-fortran/kernels-map-1.f90 (revision 231430)
+++ libgomp/testsuite/libgomp.oacc-fortran/kernels-map-1.f90 (working copy)
@@ -1,9 +1,9 @@
-! Test the copy, copyin, copyout, pcopy, pcopyin, and pcopyout
+! Test the copy, copyin, copyout, pcopy, pcopyin, pcopyout, and pcreate
! clauses on kernels constructs.
program map
integer, parameter :: n = 20, c = 10
- integer :: i, a(n), b(n)
+ integer :: i, a(n), b(n), d(n)
a(:) = 0
b(:) = 0
@@ -88,6 +88,20 @@
!$acc end kernels
call check (a, b, n)
+
+ ! PRESENT_OR_CREATE
+
+ a(:) = 0
+
+ !$acc kernels pcopyout (a) pcreate (d)
+ !$acc loop
+ do i = 1, n
+ d(i) = i
+ a(i) = d(i)
+ end do
+ !$acc end kernels
+
+ call check (a, b, n)
end program map
subroutine check (a, b, n)