This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] [og9] Fix libgomp.oacc-fortran/lib-13.f90 async bug

This patch fixes a bug with the lib-13.f90 test -- an asynchronous
compute region inside a synchronous data region leads to a data race
copying out/unmapping target data.

This test failed intermittently for AMD GCN. I will apply to the
openacc-gcc-9-branch shortly.




	* testsuite/libgomp.oacc-fortran/lib-13.f90: End data region after
	wait API calls.
 libgomp/ChangeLog.openacc                         | 5 +++++
 libgomp/testsuite/libgomp.oacc-fortran/lib-13.f90 | 3 +--
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/libgomp/ChangeLog.openacc b/libgomp/ChangeLog.openacc
index f9d8e6ecd39..c7ef40e922c 100644
--- a/libgomp/ChangeLog.openacc
+++ b/libgomp/ChangeLog.openacc
@@ -1,3 +1,8 @@
+2019-09-05  Julian Brown  <>
+	* testsuite/libgomp.oacc-fortran/lib-13.f90: End data region after
+	wait API calls.
 2019-08-13  Julian Brown  <>
 	* plugin/plugin-gcn.c (queue_push_callback): Wait on queue-full
diff --git a/libgomp/testsuite/libgomp.oacc-fortran/lib-13.f90 b/libgomp/testsuite/libgomp.oacc-fortran/lib-13.f90
index da944c35de9..ea35d71b789 100644
--- a/libgomp/testsuite/libgomp.oacc-fortran/lib-13.f90
+++ b/libgomp/testsuite/libgomp.oacc-fortran/lib-13.f90
@@ -19,11 +19,10 @@ program main
         end do
       !$acc end parallel
     end do
-  !$acc end data
   call acc_wait_all_async (nprocs + 1)
   call acc_wait (nprocs + 1)
+  !$acc end data
   if (acc_async_test (1) .neqv. .TRUE.) call abort
   if (acc_async_test (2) .neqv. .TRUE.) call abort

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]