https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83344
--- Comment #6 from Steve Kargl <sgk at troutmask dot apl.washington.edu> --- In resolve.c(resolve_assoc_var) one finds this chuck of code /* Fix up the type-spec for CHARACTER types. */ if (sym->ts.type == BT_CHARACTER && !sym->attr.select_type_temporary) { if (!sym->ts.u.cl) sym->ts.u.cl = target->ts.u.cl; if (!sym->ts.u.cl->length && !sym->ts.deferred) sym->ts.u.cl->length = gfc_get_int_expr (gfc_default_integer_kind, NULL, target->value.character.length); } This code does handle an assumed length type parameter nor the return from a CHARACTER function.