aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian Brown <julian@codesourcery.com>2019-09-06 08:46:20 -0700
committerThomas Schwinge <thomas@codesourcery.com>2020-03-03 12:51:08 +0100
commit3f14dd44b3996135962e83eaab9a3aa1f7fe5618 (patch)
treee25eff33a6a436c5a3f473cd3fb56140f92935d5
parentc157d67a69dffe45d4ac52bb106b438ab555a3fe (diff)
downloadgcc-3f14dd44b3996135962e83eaab9a3aa1f7fe5618.zip
gcc-3f14dd44b3996135962e83eaab9a3aa1f7fe5618.tar.gz
gcc-3f14dd44b3996135962e83eaab9a3aa1f7fe5618.tar.bz2
[og9] Use more appropriate var in localize_reductions call
gcc/ * gimplify.c (gimplify_omp_for): Use for_stmt in call to localize_reductions. (cherry picked from openacc-gcc-9-branch commit fda67bec41cbd463c1a4b048e3427fd8084dac30)
-rw-r--r--gcc/ChangeLog.omp5
-rw-r--r--gcc/gimplify.c3
2 files changed, 7 insertions, 1 deletions
diff --git a/gcc/ChangeLog.omp b/gcc/ChangeLog.omp
index ffe19bc..02667a2 100644
--- a/gcc/ChangeLog.omp
+++ b/gcc/ChangeLog.omp
@@ -1,5 +1,10 @@
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.
(bb_pair_t, bb_pair_vec_t, pseudo_node_t, bracket, bracket_vec_t,
bb_sese, bb_sese::~bb_sese, bb_sese::append, bb_sese::remove,
diff --git a/gcc/gimplify.c b/gcc/gimplify.c
index 3d86944..6076150 100644
--- a/gcc/gimplify.c
+++ b/gcc/gimplify.c
@@ -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