]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
[og9] Use more appropriate var in localize_reductions call
authorJulian Brown <julian@codesourcery.com>
Fri, 6 Sep 2019 15:46:20 +0000 (08:46 -0700)
committerThomas Schwinge <thomas@codesourcery.com>
Tue, 3 Mar 2020 11:51:08 +0000 (12:51 +0100)
gcc/
* gimplify.c (gimplify_omp_for): Use for_stmt in call to
localize_reductions.

(cherry picked from openacc-gcc-9-branch commit
fda67bec41cbd463c1a4b048e3427fd8084dac30)

gcc/ChangeLog.omp
gcc/gimplify.c

index ffe19bc5809711da6309bf8a3c7981ec40729d80..02667a2aed4be3b91c9f2428fe74977c234df6f8 100644 (file)
@@ -1,3 +1,8 @@
+2019-09-06  Julian Brown  <julian@codesourcery.com>
+
+       * gimplify.c (gimplify_omp_for): Use for_stmt in call to
+       localize_reductions.
+
 2019-09-06  Julian Brown  <julian@codesourcery.com>
 
        * config/nvptx/nvptx.c (omp-sese.h): Include.
index 3d869447d70282b2c457c5a646e14e438f0ca6a5..60761504a5e90bacb593d0b8338076d68c7bfaba 100644 (file)
@@ -11082,7 +11082,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