https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110658
Bug ID: 110658 Summary: MINVAL/MAXVAL and deferred-length character arrays Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: anlauf at gcc dot gnu.org Target Milestone: --- Spin-off from pr110288: program p character(len=2), allocatable :: fixed(:) character(len=:), allocatable :: array(:) fixed = ["bb", "aa"] array = ["bb", "aa"] print *, minval (fixed) ! OK print *, maxval (array) ! runtime error end While the MINVAL for the fixed-length character array works fine, the MAXVAL for the deferred-length character array gives at runtime: a.out: ../../../gcc-trunk/libgfortran/generated/maxval0_s1.c:68: maxval0_s1: Assertion `xlen == len' failed. All versions since gcc-8 (when MINVAL/MAXVAL of character was implemented) fail.