https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92929
Bug ID: 92929 Summary: Fortran OpenACC/OpenMP 'target' 'exit data'/'update' optimizations Product: gcc Version: unknown Status: UNCONFIRMED Keywords: openacc, openmp Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: tschwinge at gcc dot gnu.org CC: burnus at gcc dot gnu.org, jakub at gcc dot gnu.org, jules at gcc dot gnu.org Target Milestone: --- As of Tobias' recent r277631 "Fortran/OpenMP] Don't create "alloc:" for 'target exit data'", <http://mid.mail-archive.com/7a5f39e8-a33b-048a-f9c1-1355b941771e@codesourcery.com>, this is done for Fortran OpenMP '!$omp target exit data'/'!$omp target update', but not for OpenACC '!$acc exit data'/'!$acc update'; see 'gcc/gimplify.c:gimplify_scan_omp_clauses': /* 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; Note that I'm not proposing to also do that for OpenACC at this point; I have one doubt about that I need to look into first, but don't have time for right now.