------- Comment #2 from burnus at gcc dot gnu dot org 2009-07-27 10:08 ------- The following looks wrong:
gfc_resolve_transfer (gfc_expr *f, gfc_expr *source ATTRIBUTE_UNUSED, gfc_expr *mold, gfc_expr *size) [...] if (mold->ts.type == BT_CHARACTER && !mold->ts.cl->length && !(mold->expr_type == EXPR_VARIABLE && mold->symtree->n.sym->attr.dummy)) mold->ts.cl->length = gfc_int_expr (mold->value.character.length); For the testcase: mold->ts.type == BT_CHARACTER mold->ts.cl->length == NULL mold->expr_type == EXPR_VARIABLE mold->symtree == NULL (!) and mold->value.character.length == 19532032 -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40847