diff options
Diffstat (limited to 'gcc/gimplify.c')
-rw-r--r-- | gcc/gimplify.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/gimplify.c b/gcc/gimplify.c index 80c6bf2..438efba 100644 --- a/gcc/gimplify.c +++ b/gcc/gimplify.c @@ -7910,7 +7910,9 @@ gimplify_adjust_omp_clauses (gimple_seq *pre_p, gimple_seq body, tree *list_p, n = splay_tree_lookup (ctx->variables, (splay_tree_key) decl); if ((ctx->region_type & ORT_TARGET) != 0 && !(n->value & GOVD_SEEN) - && GOMP_MAP_ALWAYS_P (OMP_CLAUSE_MAP_KIND (c)) == 0) + && GOMP_MAP_ALWAYS_P (OMP_CLAUSE_MAP_KIND (c)) == 0 + && !lookup_attribute ("omp declare target link", + DECL_ATTRIBUTES (decl))) { remove = true; /* For struct element mapping, if struct is never referenced |