[Bug fortran/123252] OpenACC: derived-type scalar component has wrong value in device kernel when only array component is mapped
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=123252
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/31
This supersedes attachment 63144. The fix stays in the Fortran front
end (trans-openmp.cc): when enter data maps an allocatable component,
eligible scalar siblings of the derived type are mapped too, so later
device regions see their values instead of garbage. New in this
version: exit data and delete/release get matching alloc, release, or
delete mappings; component order is preserved for GOMP_MAP_STRUCT
grouping; nested derived-type parents are handled; class and array
parent paths are left unchanged; OpenMP enter/exit data is covered as
well, with gomp and goacc dump tests plus two libgomp OpenACC runtime
tests. check-fortran and check-target-libgomp-fortran are clean.