]> gcc.gnu.org Git - gcc.git/commit
OpenMP/Fortran: Fix unmapping of GOMP_MAP_POINTER for scalar allocatables/pointers
authorTobias Burnus <tobias@codesourcery.com>
Thu, 23 Mar 2023 07:57:45 +0000 (08:57 +0100)
committerTobias Burnus <tobias@codesourcery.com>
Thu, 23 Mar 2023 07:57:45 +0000 (08:57 +0100)
commit8ea805840200f7dfd2c11b37abf5fbfe479c2fe2
tree25f3b00ddf7c4f62147028ad3b3ed1badfdad811
parent4ac218a3f08bb6bfef3a0bea13cf81da8479a722
OpenMP/Fortran: Fix unmapping of GOMP_MAP_POINTER for scalar allocatables/pointers

target exit data: Do unmap GOMP_MAP_POINTER for scalar allocatables/pointers
to prevent stale mappings.

While for allocatable/pointer arrays, there is a PSET followed by POINTER,
for allocatable/pointer scalars there is only a POINTER. Before the below
mentioned OG12 patch: For exit data, PSET was converted to RELEASE/DELETE
in gimplify.cc while all POINTER were removed; correct for arrays but leaving
POINTER behind for scalars. Since that commit, all in trans-openmp.cc but
the scalar case was still mishandled before this follow-up commit.

This is a follow up to OG12's 55a18d4744258e3909568e425f9f473c49f9d13f
While the problem is independent, it will be merged into v4 of the
mainline patch
'Fortran/OpenMP: Fix mapping of array descriptors and deferred-length strings'

gcc/fortran/

* trans-openmp.cc (gfc_trans_omp_clauses): Fix unmapping of
GOMP_MAP_POINTER for scalar allocatables/pointers.

gcc/testsuite/

* gfortran.dg/gomp/map-10.f90: New test.
gcc/fortran/ChangeLog.omp
gcc/fortran/trans-openmp.cc
gcc/testsuite/ChangeLog.omp
gcc/testsuite/gfortran.dg/gomp/map-10.f90 [new file with mode: 0644]
This page took 0.065414 seconds and 6 git commands to generate.