[Bug fortran/83344] Use of uninitialized memory with ASSOCIATE and strings
sgk at troutmask dot apl.washington.edu
gcc-bugzilla@gcc.gnu.org
Tue Dec 12 20:04:00 GMT 2017
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.
More information about the Gcc-bugs
mailing list