From: Jerry DeLisle Date: Tue, 25 Aug 2009 05:22:14 +0000 (+0000) Subject: re PR fortran/41162 (416.gamess in SPEC CPU 2006 failed to build) X-Git-Tag: releases/gcc-4.5.0~3859 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c50d968717f1737cff7c238df166906aed8bab3a;p=thirdparty%2Fgcc.git re PR fortran/41162 (416.gamess in SPEC CPU 2006 failed to build) 2009-08-24 Jerry DeLisle PR fortran/41162 * io.c (check_format): Fix to not error on slash after P. Fix some error loci. From-SVN: r151074 --- diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 330ced87abc3..15881c94ca0d 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,9 @@ +2009-08-24 Jerry DeLisle + + PR fortran/41162 + * io.c (check_format): Fix to not error on slash after P. Fix some + error loci. + 2009-08-24 Jerry DeLisle PR fortran/41154 diff --git a/gcc/fortran/io.c b/gcc/fortran/io.c index 239d1e27a1a6..a0a4356de39e 100644 --- a/gcc/fortran/io.c +++ b/gcc/fortran/io.c @@ -694,7 +694,7 @@ data_desc: goto fail; if (gfc_option.allow_std < GFC_STD_F2003 && t != FMT_COMMA && t != FMT_F && t != FMT_E && t != FMT_EN && t != FMT_ES - && t != FMT_D && t != FMT_G && t != FMT_RPAREN) + && t != FMT_D && t != FMT_G && t != FMT_RPAREN && t != FMT_SLASH) { error = _("Comma required after P descriptor"); goto syntax; @@ -708,7 +708,7 @@ data_desc: goto fail; } if (t != FMT_F && t != FMT_E && t != FMT_EN && t != FMT_ES && t != FMT_D - && t != FMT_G && t != FMT_RPAREN) + && t != FMT_G && t != FMT_RPAREN && t != FMT_SLASH) { error = _("Comma required after P descriptor"); goto syntax; @@ -839,6 +839,9 @@ data_desc: gfc_warning ("Period required in format " "specifier %s at %L", token_to_string (t), &format_locus); + /* If we go to finished, we need to unwind this + before the next round. */ + format_locus.nextc -= format_string_pos; saved_token = u; break; } @@ -1009,6 +1012,10 @@ between_desc: if (gfc_notify_std (GFC_STD_GNU, "Extension: Missing comma at %L", &format_locus) == FAILURE) return FAILURE; + /* If we do not actually return a failure, we need to unwind this + before the next round. */ + if (mode != MODE_FORMAT) + format_locus.nextc -= format_string_pos; goto format_item_1; } @@ -1068,6 +1075,10 @@ extension_optional_comma: if (gfc_notify_std (GFC_STD_GNU, "Extension: Missing comma at %L", &format_locus) == FAILURE) return FAILURE; + /* If we do not actually return a failure, we need to unwind this + before the next round. */ + if (mode != MODE_FORMAT) + format_locus.nextc -= format_string_pos; saved_token = t; break; }