aboutsummaryrefslogtreecommitdiff
path: root/gcc/gimplify.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2021-05-20 09:17:40 +0200
committerJakub Jelinek <jakub@redhat.com>2021-05-20 09:17:40 +0200
commit94fa4c67b95c12482b6087d8eef2d72f7b7ea254 (patch)
tree9ff38f86b4b294f4de1f3d6e7ab9deedee21182f /gcc/gimplify.c
parent2b536797f7e43c55072a3215735f5833f1d6d218 (diff)
downloadgcc-94fa4c67b95c12482b6087d8eef2d72f7b7ea254.zip
gcc-94fa4c67b95c12482b6087d8eef2d72f7b7ea254.tar.gz
gcc-94fa4c67b95c12482b6087d8eef2d72f7b7ea254.tar.bz2
openmp: Handle explicit linear clause properly in combined constructs with target [PR99928]
linear clause should have the effect of firstprivate+lastprivate (or for IVs not declared in the construct lastprivate) on outer constructs and eventually map(tofrom:) on target when combined with it. 2021-05-20 Jakub Jelinek <jakub@redhat.com> PR middle-end/99928 * gimplify.c (gimplify_scan_omp_clauses) <case OMP_CLAUSE_LINEAR>: For explicit linear clause when combined with target, make it map(tofrom:) instead of no clause or firstprivate. * c-c++-common/gomp/pr99928-4.c: Remove all xfails. * c-c++-common/gomp/pr99928-5.c: Likewise.
Diffstat (limited to 'gcc/gimplify.c')
-rw-r--r--gcc/gimplify.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/gcc/gimplify.c b/gcc/gimplify.c
index 2730f22..719a4e1 100644
--- a/gcc/gimplify.c
+++ b/gcc/gimplify.c
@@ -8884,9 +8884,8 @@ gimplify_scan_omp_clauses (tree *list_p, gimple_seq *pre_p,
else if (octx
&& octx->region_type == ORT_COMBINED_TARGET)
{
- flags &= ~GOVD_LASTPRIVATE;
- if (flags == GOVD_SEEN)
- break;
+ if (flags & GOVD_LASTPRIVATE)
+ flags = GOVD_SEEN | GOVD_MAP;
}
else
break;