diff mbox series

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

Message ID 20190905004014.37511-1-julian@codesourcery.com
State New
Headers show
Series [og9] Fix libgomp.oacc-fortran/lib-13.f90 async bug | expand

Commit Message

Julian Brown Sept. 5, 2019, 12:40 a.m. UTC
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.

Thanks,

Julian

ChangeLog

	libgomp/
	* 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 mbox series

Patch

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  <julian@codesourcery.com>
+
+	* testsuite/libgomp.oacc-fortran/lib-13.f90: End data region after
+	wait API calls.
+
 2019-08-13  Julian Brown  <julian@codesourcery.com>
 
 	* 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