]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Revert "GCC11 - Fortran: combined directives - order(concurrent) not on distribute"
authorTobias Burnus <tobias@codesourcery.com>
Mon, 20 Sep 2021 15:26:57 +0000 (17:26 +0200)
committerTobias Burnus <tobias@codesourcery.com>
Mon, 20 Sep 2021 15:26:57 +0000 (17:26 +0200)
This reverts commit b1dc26d3543d79805751c26ba5b142eeeb1f55b8.
Reason: This only applies to GCC 11 and is superceeded to a GCC 12 patch,
which will be cherry-picked in the next commit.

gcc/fortran/trans-openmp.c
gcc/testsuite/gfortran.dg/gomp/distribute-order-concurrent.f90 [deleted file]

index 27cc09ed1feba296c3769d21e1f12041e73cd1fd..9d455efee42e531bba895b5b03fc4cb1bc13039b 100644 (file)
@@ -5927,6 +5927,8 @@ gfc_split_omp_clauses (gfc_code *code,
          /* Duplicate collapse.  */
          clausesa[GFC_OMP_SPLIT_DISTRIBUTE].collapse
            = code->ext.omp_clauses->collapse;
+         clausesa[GFC_OMP_SPLIT_DISTRIBUTE].order_concurrent
+           = code->ext.omp_clauses->order_concurrent;
        }
       if (mask & GFC_OMP_MASK_PARALLEL)
        {
diff --git a/gcc/testsuite/gfortran.dg/gomp/distribute-order-concurrent.f90 b/gcc/testsuite/gfortran.dg/gomp/distribute-order-concurrent.f90
deleted file mode 100644 (file)
index 9597d91..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-! { dg-additional-options "-fdump-tree-original" }
-!
-! In OpenMP 5.0, 'order(concurrent)' does not apply to distribute
-! Ensure that it is rejected in GCC 11.
-! 
-! Note: OpenMP 5.1 allows it; the GCC 12 testcase for it is gfortran.dg/gomp/order-5.f90
-
-subroutine f(a)
-implicit none
-integer :: i, thr
-!save :: thr
-integer :: a(:)
-
-!$omp distribute parallel do order(concurrent) private(thr)
-  do i = 1, 10
-    thr = 5
-    a(i) = thr
-  end do
-!$omp end distribute parallel do
-end
-
-! { dg-final { scan-tree-dump-not "omp distribute\[^\n\r]*order" "original" } }
-! { dg-final { scan-tree-dump "#pragma omp distribute\[\n\r\]" "original" } }
-! { dg-final { scan-tree-dump "#pragma omp parallel private\\(thr\\)" "original" } }
-! { dg-final { scan-tree-dump "#pragma omp for nowait order\\(concurrent\\)" "original" } }