public inbox for fortran@gcc.gnu.org
 help / color / mirror / Atom feed
* [gomp4] Add Fortran runtime test
@ 2015-12-08 23:24 James Norris
  0 siblings, 0 replies; only message in thread
From: James Norris @ 2015-12-08 23:24 UTC (permalink / raw)
  To: GCC Patches; +Cc: fortran, Thomas Schwinge

[-- Attachment #1: Type: text/plain, Size: 110 bytes --]

Hi,

Add test to exercise the kernels construct with the
pcreate clause.

Committed to gomp-4_0-branch.

Jim


[-- Attachment #2: ftest.patch --]
[-- Type: text/x-patch, Size: 1398 bytes --]

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)

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2015-12-08 23:24 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-12-08 23:24 [gomp4] Add Fortran runtime test James Norris

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).