https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102891
Bug ID: 102891 Summary: Passing real part of complex type component using w%z%re to a subroutine gives erroneous value of dummy argument Product: gcc Version: 11.1.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: oeyvindyr at hotmail dot com Target Milestone: --- Created attachment 51653 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=51653&action=edit minimal fortran program The attached minimal program prints the real part of a complex allocatable type component in two ways: 1) "print*,w%z%re" in the caller 2) By passing w%z%re to a subroutine that prints the array. The printed numbers are different in the two cases, and it seems that the dummy argument in the called subroutine gets an incorrect stride of 1, whereas it should be 2 for the real part of a complex array. Compiling with ifort gives the expected result and no warnings.