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 <jnor...@codesourcery.com> + + * testsuite/libgomp.oacc-fortran/kernels-map-1.f90: Add new test. + 2015-12-08 Thomas Schwinge <tho...@codesourcery.com> James Norris <jnor...@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)