https://gcc.gnu.org/bugzilla/show_bug.cgi?id=124178
Bug ID: 124178
Summary: [OpenMP] Mapping a nested allocatable along its parent
on the same target directive
Product: gcc
Version: 16.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
Assignee: unassigned at gcc dot gnu.org
Reporter: parras at gcc dot gnu.org
Target Milestone: ---
Created attachment 63730
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=63730&action=edit
Testcase
Despite recent improvements in mapping derived-type allocatable components, the
following case is still not handled properly:
!$omp target map(tofrom: chunk%tiles(1)%field(1)%density1, chunk)
Assuming all components are allocatable, mapping explicitly both chunk and
density1 results in the following runtime error:
libgomp: Trying to map into device [0x7071e0..0x707260) object when
[0x7071e0..0x707220) is already mapped
It is not yet completely clear, from the latest OpenMP spec, what the expected
behaviour is. Is the whole of chunk as well as its (allocatable) subcomponents
supposed to be deep-mapped? Is the density1 map redundant?
Once the precise semantics has been clarified, the appropriate fix can be
applied.