diff options
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/gimplify.c | 11 |
2 files changed, 17 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 0be5eb3..d1110fc 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2019-10-30 Tobias Burnus <tobias@codesourcery.com> + + * gimplify.c (gimplify_scan_omp_clauses): Remove FE-generated + GOMP_MAP_TO_PSET and GOMP_MAP_POINTER mapping for 'target update' + and 'target exit data'. + 2019-10-30 Martin Jambor <mjambor@suse.cz> ipa/92278 diff --git a/gcc/gimplify.c b/gcc/gimplify.c index fdf6b69..12ed3f8 100644 --- a/gcc/gimplify.c +++ b/gcc/gimplify.c @@ -8590,6 +8590,17 @@ gimplify_scan_omp_clauses (tree *list_p, gimple_seq *pre_p, default: break; } + /* For Fortran, not only the pointer to the data is mapped but also + the address of the pointer, the array descriptor etc.; for + 'exit data' - and in particular for 'delete:' - having an 'alloc:' + does not make sense. Likewise, for 'update' only transferring the + data itself is needed as the rest has been handled in previous + directives. */ + 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)) + remove = true; + if (remove) break; if (DECL_P (decl) && outer_ctx && (region_type & ORT_ACC)) |