https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120140
anlauf at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |anlauf at gcc dot gnu.org
--- Comment #4 from anlauf at gcc dot gnu.org ---
Created attachment 64148
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=64148&action=edit
Partial patch
Gonzalo contacted me off-list and drew my attention to this PR,
which he had reduced to the simpler case of just derived types.
I noticed that the -fdump-fortran-original looks suspicious, and traced
the reason back to gfc_compare_actual_formal, which does not properly
implement the standard:
! F2023: 15.5.2.5 Ordinary dummy variables
!
! (21) If the procedure is nonelemental, the dummy argument does not have
! the VALUE attribute, and the actual argument is an array section having a
! vector subscript, the dummy argument is not definable and shall not
! have the ASYNCHRONOUS, INTENT (OUT), INTENT (INOUT), or VOLATILE attributes.
The attached patch fixes the derived types case for me. However, I do not
immediately see where the variant with CLASS fails.
Paul, can you have a look, and do you want to take over from here?