https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113867

--- Comment #1 from Tobias Burnus <burnus at gcc dot gnu.org> ---
Created attachment 57382
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=57382&action=edit
Fortran testcase, kind of, as pointer + pointee mapping cannot be split
(working)

For completeness, a Fortran testcase.
(This Testcase works on GCC 13 and mainline.)

As in Fortran, 'map(ptr, dt%ptr)' will always attempt to map the pointer and
the pointer, it is not possible to split
   map(s2.p[:N])  // map the pointee
   map(s2.p, s2.p[:0]) // map the pointer and try pointer attachment
as in C/C++. And using 'map(s.p)' will prevent a later inner 'map(s.a,...)' as
's' is already partially mapped. Hence, the aux 'ptr' is used, but that kind of
defeats the purpose of this testcase.

Reply via email to