]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
openacc: Fix race condition in Fortran loop collapse tests
authorJulian Brown <julian@codesourcery.com>
Thu, 25 Jun 2020 14:40:53 +0000 (07:40 -0700)
committerKwok Cheung Yeung <kcy@codesourcery.com>
Thu, 22 Apr 2021 17:14:25 +0000 (10:14 -0700)
The gangs participating in a gang-partitioned loop are not all guaranteed
to complete before some given gang continues to execute beyond that loop.
This means that two existing test cases contain a race condition,
because a loop that may be gang-partitioned is followed immediately by
another loop.  The fix is to place the loops in separate parallel regions.

2020-07-15  Julian Brown  <julian@codesourcery.com>

libgomp/
* testsuite/libgomp.oacc-fortran/collapse-1.f90: Fix race condition.
* testsuite/libgomp.oacc-fortran/collapse-2.f90: Likewise.

libgomp/ChangeLog.omp

index e407b9f439940247650bde8d933ed3820a209374..48be697a23e53189c8e9afa9743fe020e3930026 100644 (file)
@@ -1,3 +1,8 @@
+2020-07-15  Julian Brown  <julian@codesourcery.com>
+
+       * testsuite/libgomp.oacc-fortran/collapse-1.f90: Fix race condition.
+       * testsuite/libgomp.oacc-fortran/collapse-2.f90: Likewise.
+
 2020-06-02  Kwok Cheung Yeung  <kcy@codesourcery.com>
 
        * testsuite/libgomp.oacc-c-c++-common/routine-wv-2.c (DoWorkVec):