https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100950
--- Comment #11 from anlauf at gcc dot gnu.org --- The variant with typespec and non-constant length is incorrectly rejected: program p integer :: n = 2 print *, [character(n) :: 'a', 'b'] end All versions since at least gcc-7 give: pr100950-z3.f90:3:0: print *, [character(n) :: 'a', 'b'] Error: size of variable 'A.1' is too large Maybe the issue here is somewhere in trans-array.c(gfc_walk_array_constructor), but that is unrelated to the issue with constant substring length.