]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
[og9] Fix libgomp.oacc-fortran/lib-16.f90 test
authorKwok Cheung Yeung <kcy@codesourcery.com>
Fri, 22 Nov 2019 17:02:19 +0000 (09:02 -0800)
committerThomas Schwinge <thomas@codesourcery.com>
Tue, 3 Mar 2020 11:51:25 +0000 (12:51 +0100)
2019-11-22  Kwok Cheung Yeung  <kcy@codesourcery.com>

libgomp/
* testsuite/libgomp.oacc-fortran/lib-16.f90: Fix async-safety issue.

(cherry picked from openacc-gcc-9-branch commit
d68cd776e4a5e7a93e7c5c4cb24ae7d664a6e995)

libgomp/ChangeLog.omp
libgomp/testsuite/libgomp.oacc-fortran/lib-16.f90

index b1748accd5dc4c8d748c4829b9fa9e0f332f3b82..88957864a698700b19b1610c45d7351634a06924 100644 (file)
@@ -1,3 +1,7 @@
+2019-11-22  Kwok Cheung Yeung  <kcy@codesourcery.com>
+
+       * testsuite/libgomp.oacc-fortran/lib-16.f90: Fix async-safety issue.
+
 2019-10-16  Julian Brown  <julian@codesourcery.com>
 
        * testsuite/libgomp.oacc-fortran/gangprivate-attrib-1.f90: Use
index 011f9cf31db4b1f8db724c5e79feae8072054656..5e01099b0cb328d5bb0b300469c25a21edf34b06 100644 (file)
@@ -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