From 7de20fbd6e9490871a9e4ebf3ee261d943061b1c Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Fri, 15 Aug 2014 09:40:03 +0200 Subject: [PATCH] re PR middle-end/62092 (libgomp.c++/target-2.C FAIL while compiling for OpenMP 4.0 offload target) PR middle-end/62092 * gimplify.c (gimplify_adjust_omp_clauses_1): Don't remove OMP_CLAUSE_SHARED for global vars if the global var is mentioned in OMP_CLAUSE_MAP in some outer target region. From-SVN: r214001 --- gcc/ChangeLog | 7 +++++++ gcc/gimplify.c | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index e7ade949329d..284661dfa1b9 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2014-08-15 Jakub Jelinek + + PR middle-end/62092 + * gimplify.c (gimplify_adjust_omp_clauses_1): Don't remove + OMP_CLAUSE_SHARED for global vars if the global var is mentioned + in OMP_CLAUSE_MAP in some outer target region. + 2014-08-15 Bin Cheng * tree-ssa-loop-ivopts.c (ivopts_data): New field diff --git a/gcc/gimplify.c b/gcc/gimplify.c index 279158d4d4a7..658c5d2fac39 100644 --- a/gcc/gimplify.c +++ b/gcc/gimplify.c @@ -6308,7 +6308,7 @@ gimplify_adjust_omp_clauses_1 (splay_tree_node n, void *data) = splay_tree_lookup (ctx->variables, (splay_tree_key) decl); if (on && (on->value & (GOVD_FIRSTPRIVATE | GOVD_LASTPRIVATE | GOVD_PRIVATE | GOVD_REDUCTION - | GOVD_LINEAR)) != 0) + | GOVD_LINEAR | GOVD_MAP)) != 0) break; ctx = ctx->outer_context; } -- 2.47.3