https://gcc.gnu.org/bugzilla/show_bug.cgi?id=48890
Francois-Xavier Coudert <fxcoudert at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fxcoudert at gcc dot gnu.org --- Comment #2 from Francois-Xavier Coudert <fxcoudert at gcc dot gnu.org> --- This is indeed a wrong-code bug. It's been reported on comp.lang.fortran today: implicit none type :: a_t character(len=10) :: s = "x" end type a_t type(a_t), parameter :: foo = a_t("") type(a_t), parameter :: bar = a_t() print *, len(foo%s), len_trim(foo%s) print *, len(bar%s), len_trim(bar%s) end gives 0 0 10 1 while it should give: 10 0 10 1