]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Use more appropriate var in localize_reductions call
authorJulian Brown <julian@codesourcery.com>
Fri, 6 Sep 2019 15:46:20 +0000 (08:46 -0700)
committerKwok Cheung Yeung <kcy@codesourcery.com>
Tue, 21 Jun 2022 13:11:18 +0000 (14:11 +0100)
gcc/
* gimplify.cc (gimplify_omp_for): Use for_stmt in call to
localize_reductions.

gcc/ChangeLog.omp
gcc/gimplify.cc

index ac314abcc14399074b791480cc3da6ce1b9f8c29..8cd46a74aa39668dfc2e780b809e082f8d6a7fe8 100644 (file)
@@ -1,3 +1,8 @@
+2019-09-06  Julian Brown  <julian@codesourcery.com>
+
+       * gimplify.cc (gimplify_omp_for): Use for_stmt in call to
+       localize_reductions.
+
 2019-09-06  Julian Brown  <julian@codesourcery.com>
 
        * gimplify.cc (gimplify_omp_workshare): Use OMP_CLAUSES, OMP_BODY
index 5d0a51438ac20691a829aff5b623ccbc36a465bd..90e74b5877f1f1e1b2c64a96dfca5d5339163923 100644 (file)
@@ -12854,7 +12854,8 @@ gimplify_omp_for (tree *expr_p, gimple_seq *pre_p)
         here, because the code to remove reductions in kernels regions cannot
         handle that.  */
       if (outer && outer->region_type == ORT_ACC_PARALLEL)
-       localize_reductions (OMP_FOR_CLAUSES (*expr_p), OMP_FOR_BODY (*expr_p));
+       localize_reductions (OMP_FOR_CLAUSES (for_stmt),
+                            OMP_FOR_BODY (for_stmt));
     }
 
   /* Set OMP_CLAUSE_LINEAR_NO_COPYIN flag on explicit linear