[Bug fortran/123282] [OpenACC/Fortran] Illegal memory access with derived type component in repeated alloc/dealloc cycle (order-dependent)

albert at tugraz dot at via Gcc-bugs <[email protected]>
Newsgroups gmane.comp.gcc.bugs
Message-ID <[email protected]/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=123282

Christopher Albert <albert at tugraz dot at> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jvdelisle at gcc dot gnu.org

--- Comment #7 from Christopher Albert <albert at tugraz dot at> ---
Open for review, comments welcome:
https://github.com/lazy-fortran/gcc/pull/33

This carries attachment 63146 forward. The duplicate-key compensation
in goacc_enter_data_internal is narrowed to GOMP_MAP_TO_PSET groups:
each descriptor key is counted once for a new TO_PSET group and the
extra refcount added for its pointer entry is cancelled, so repeated
alloc/enter/exit/deallocate cycles no longer leave a stale mapping.
Includes a runtime test with reallocation cycles. The reproducer fails
before and passes after on a real NVPTX device; check-fortran and the
libgomp suites are clean.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.