aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian Brown <julian@codesourcery.com>2019-09-06 04:42:16 -0700
committerKwok Cheung Yeung <kcy@codesourcery.com>2022-06-21 14:11:18 +0100
commit9793ca937c6c88b944870259c87b934cf9747d0b (patch)
treee02696159b7019d9649ae9b1c0694d7527ecc9b6
parent0855e5375422156e27e60e820a26265016ffb23e (diff)
downloadgcc-9793ca937c6c88b944870259c87b934cf9747d0b.zip
gcc-9793ca937c6c88b944870259c87b934cf9747d0b.tar.gz
gcc-9793ca937c6c88b944870259c87b934cf9747d0b.tar.bz2
Fix tree check failure with reduction localization
gcc/ * gimplify.cc (gimplify_omp_workshare): Use OMP_CLAUSES, OMP_BODY instead of OMP_TARGET_CLAUSES, OMP_TARGET_BODY.
-rw-r--r--gcc/ChangeLog.omp5
-rw-r--r--gcc/gimplify.cc3
2 files changed, 6 insertions, 2 deletions
diff --git a/gcc/ChangeLog.omp b/gcc/ChangeLog.omp
index de0cdc4..ac314ab 100644
--- a/gcc/ChangeLog.omp
+++ b/gcc/ChangeLog.omp
@@ -1,3 +1,8 @@
+2019-09-06 Julian Brown <julian@codesourcery.com>
+
+ * gimplify.cc (gimplify_omp_workshare): Use OMP_CLAUSES, OMP_BODY
+ instead of OMP_TARGET_CLAUSES, OMP_TARGET_BODY.
+
2019-09-05 Cesar Philippidis <cesar@codesourcery.com>
Julian Brown <julian@codesourcery.com>
diff --git a/gcc/gimplify.cc b/gcc/gimplify.cc
index 585abe0..5d0a514 100644
--- a/gcc/gimplify.cc
+++ b/gcc/gimplify.cc
@@ -14456,8 +14456,7 @@ gimplify_omp_workshare (tree *expr_p, gimple_seq *pre_p)
/* FIXME: Reductions are not supported in kernels regions yet. */
if (/*ort == ORT_ACC_KERNELS ||*/ ort == ORT_ACC_PARALLEL)
- localize_reductions (OMP_TARGET_CLAUSES (*expr_p),
- OMP_TARGET_BODY (*expr_p));
+ localize_reductions (OMP_CLAUSES (expr), OMP_BODY (expr));
gimple *g = gimplify_and_return_first (OMP_BODY (expr), &body);
if (gimple_code (g) == GIMPLE_BIND)