https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100650
Bug ID: 100650 Summary: Passing a derived-type array constructor to the reshape intrinsic gives incorrect results Product: gcc Version: 11.1.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: here.is.a.gcc.bug at gmail dot com Target Milestone: --- Created attachment 50836 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=50836&action=edit A minimum broken example. Needs no special compiler flags. A type `String` has a `character(:), allocatable` component. When an array constructor of type `String` is passed to the reshape intrinsic, the components of the resulting array are incorrect. The bug does not trigger if the array constructor is used to create a named array and this named array is passed to the reshape intrinsic. This affects at least versions 7.4.0, 10.1.0 and 11.1.1 of gfortran.