https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100950
--- Comment #5 from G. Steinmetz <gs...@t-online.de> --- It should be valid, type-spec is explicitly given and the ac-values are type compatible (see e.g. F2018 7.8). With len(x(1:2))==2 the following simplified example works : $ cat zz1.f90 program p print *, [character(2) :: 'a', 'b'] print * print *, 'len :', len ([character(3) :: 'a', 'bc', 'def', 'last']) print *, 'size:', size([character(3) :: 'a', 'bc', 'def', 'last']) print *, [character(3) :: 'a', 'bc', 'def', 'last'] end $ gfortran zz1.f90 && ./a.out a b len : 3 size: 4 a bc deflas