aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian Brown <julian@codesourcery.com>2019-09-06 04:42:16 -0700
committerThomas Schwinge <thomas@codesourcery.com>2020-03-03 12:50:41 +0100
commit9b9b4f4ded5f8376ac0f8656275e74ef49ede77e (patch)
treebd734c0407b2a39185302162cd95a5b174091b7c
parentbb75e6f6cd8d890ce518c756dd47d2ec3a08e794 (diff)
downloadgcc-9b9b4f4ded5f8376ac0f8656275e74ef49ede77e.zip
gcc-9b9b4f4ded5f8376ac0f8656275e74ef49ede77e.tar.gz
gcc-9b9b4f4ded5f8376ac0f8656275e74ef49ede77e.tar.bz2
[og9] Fix tree check failure with reduction localization
gcc/ * gimplify.c (gimplify_omp_workshare): Use OMP_CLAUSES, OMP_BODY instead of OMP_TARGET_CLAUSES, OMP_TARGET_BODY. (cherry picked from openacc-gcc-9-branch commit 53886cd9a0b09531797ddf456d9a902fc737d094)
-rw-r--r--gcc/ChangeLog.omp5
-rw-r--r--gcc/gimplify.c3
2 files changed, 6 insertions, 2 deletions
diff --git a/gcc/ChangeLog.omp b/gcc/ChangeLog.omp
index ddde3b8..9e7893a 100644
--- a/gcc/ChangeLog.omp
+++ b/gcc/ChangeLog.omp
@@ -1,3 +1,8 @@
+2019-09-06 Julian Brown <julian@codesourcery.com>
+
+ * gimplify.c (gimplify_omp_workshare): Use OMP_CLAUSES, OMP_BODY
+ instead of OMP_TARGET_CLAUSES, OMP_TARGET_BODY.
+
2019-09-05 Andrew Stubbs <ams@codesourcery.com>
Backport from mainline:
diff --git a/gcc/gimplify.c b/gcc/gimplify.c
index 685db17..3d86944 100644
--- a/gcc/gimplify.c
+++ b/gcc/gimplify.c
@@ -12253,8 +12253,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)