aboutsummaryrefslogtreecommitdiff
path: root/gcc/gimplify.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/gimplify.c')
-rw-r--r--gcc/gimplify.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/gimplify.c b/gcc/gimplify.c
index 1d532e6..e104e76 100644
--- a/gcc/gimplify.c
+++ b/gcc/gimplify.c
@@ -8766,7 +8766,9 @@ gimplify_scan_omp_clauses (tree *list_p, gimple_seq *pre_p,
to be delete; hence, we turn the MAP_TO_PSET into a MAP_DELETE. */
if (code == OMP_TARGET_EXIT_DATA
&& OMP_CLAUSE_MAP_KIND (c) == GOMP_MAP_TO_PSET)
- OMP_CLAUSE_SET_MAP_KIND (c, GOMP_MAP_DELETE);
+ OMP_CLAUSE_SET_MAP_KIND (c, OMP_CLAUSE_MAP_KIND (*prev_list_p)
+ == GOMP_MAP_DELETE
+ ? GOMP_MAP_DELETE : GOMP_MAP_RELEASE);
else if ((code == OMP_TARGET_EXIT_DATA || code == OMP_TARGET_UPDATE)
&& (OMP_CLAUSE_MAP_KIND (c) == GOMP_MAP_POINTER
|| OMP_CLAUSE_MAP_KIND (c) == GOMP_MAP_TO_PSET))