------- Comment #1 from tobias dot burnus at physik dot fu-berlin dot de 2006-11-04 17:24 ------- Fix: Reverting the change in gcc/fortran/expr.c of the following patch (which I don't understand):
r118338 | fxcoudert | 2006-10-31 21:15:22 +0100 (Tue, 31 Oct 2006) | 12 lines PR fortran/29067 * expr.c (gfc_simplify_expr): NULL-terminate the substring character constant. --- expr.c (revision 118337) +++ expr.c (revision 118338) @@ -1438,7 +1438,7 @@ gfc_extract_int (p->ref->u.ss.end, &end); s = gfc_getmem (end - start + 1); memcpy (s, p->value.character.string + start, end - start); - s[end] = '\0'; /* TODO: C-style string for debugging. */ + s[end-start+1] = '\0'; /* TODO: C-style string for debugging. */ gfc_free (p->value.character.string); p->value.character.string = s; p->value.character.length = end - start; -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29713