From: Kwok Cheung Yeung Date: Fri, 22 Nov 2019 17:02:19 +0000 (-0800) Subject: [og9] Fix libgomp.oacc-fortran/lib-16.f90 test X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2644efdcf186432e66e803889fc6e63b59b74738;p=thirdparty%2Fgcc.git [og9] Fix libgomp.oacc-fortran/lib-16.f90 test 2019-11-22 Kwok Cheung Yeung libgomp/ * testsuite/libgomp.oacc-fortran/lib-16.f90: Fix async-safety issue. (cherry picked from openacc-gcc-9-branch commit d68cd776e4a5e7a93e7c5c4cb24ae7d664a6e995) --- diff --git a/libgomp/ChangeLog.omp b/libgomp/ChangeLog.omp index b1748accd5dc..88957864a698 100644 --- a/libgomp/ChangeLog.omp +++ b/libgomp/ChangeLog.omp @@ -1,3 +1,7 @@ +2019-11-22 Kwok Cheung Yeung + + * testsuite/libgomp.oacc-fortran/lib-16.f90: Fix async-safety issue. + 2019-10-16 Julian Brown * testsuite/libgomp.oacc-fortran/gangprivate-attrib-1.f90: Use diff --git a/libgomp/testsuite/libgomp.oacc-fortran/lib-16.f90 b/libgomp/testsuite/libgomp.oacc-fortran/lib-16.f90 index 011f9cf31db4..5e01099b0cb3 100644 --- a/libgomp/testsuite/libgomp.oacc-fortran/lib-16.f90 +++ b/libgomp/testsuite/libgomp.oacc-fortran/lib-16.f90 @@ -27,6 +27,9 @@ program main if (acc_is_present (h) .neqv. .TRUE.) call abort + ! We must wait for the update to be done. + call acc_wait (async) + h(:) = 0 call acc_copyout_async (h, sizeof (h), async) @@ -45,6 +48,8 @@ program main if (acc_is_present (h) .neqv. .TRUE.) call abort + call acc_wait (async) + do i = 1, N if (h(i) /= i + i) call abort end do