[Bug fortran/123282] [OpenACC/Fortran] Illegal memory access with derived type component in repeated alloc/dealloc cycle (order-dependent)
albert at tugraz dot at
gcc-bugzilla@gcc.gnu.org
Tue Dec 23 23:13:53 GMT 2025
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=123282
Christopher Albert <albert at tugraz dot at> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #63145|0 |1
is obsolete| |
--- Comment #2 from Christopher Albert <albert at tugraz dot at> ---
Created attachment 63146
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=63146&action=edit
Fix OpenACC refcount for Fortran allocatable array descriptors
This actually fixes the issue, previous patch didn't solve it.
For Fortran allocatable arrays, TO_PSET + POINTER mapping groups create
multiple tgt->list entries referencing the same splay tree key. The
original code incremented dynamic_refcount for every list entry but
exit_data only decrements once per descriptor, causing stale mappings
in repeated alloc/enter/exit/deallocate cycles.
More information about the Gcc-bugs
mailing list