https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102315
--- Comment #3 from G. Steinmetz <gs...@t-online.de> --- A reduced variant with the same ICE : $ cat z2.f90 program p character :: x = 'a' character :: y(5) y = [[trim(x), 'b', 'c', 'd', 'e']] print *, y end But z1 gives additional hints when reduced to four or less array elements. It compiles and runs correctly, like : $ cat za1.f90 program p character(4) :: x = '123' character(8) :: y(4) y = [[character(8) :: 'a'//trim(x), 'b', 'c', 'd']] print *, y end $ gfortran-12-20210919 za1.f90 && ./a.out a123 b c d And it fails with a wrong runtime error when adding checks via -fcheck=bounds or -fcheck=all : $ gfortran-12-20210919 za1.f90 -g -fcheck=all && ./a.out At line 4 of file za1.f90 Fortran runtime error: Different CHARACTER lengths (4/8) in array constructor Error termination. Backtrace: #0 0x4026b7 in p at .../za1.f90:4 #1 0x4029c9 in main at .../za1.f90:6 That unique error message comes from line 1787 in trans-array.c