From: Jerry DeLisle Date: Mon, 12 Oct 2009 00:52:45 +0000 (+0000) Subject: re PR fortran/38439 (I/O PD edit descriptor inconsistency) X-Git-Tag: releases/gcc-4.5.0~2967 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a30595bf4307163e07024b776fa7c8e184962298;p=thirdparty%2Fgcc.git re PR fortran/38439 (I/O PD edit descriptor inconsistency) 2009-10-11 Jerry DeLisle PR libgfortran/38439 * io/format.c (parse_format_list): Correct logic for FMT_F reading vs writing. Code clean-up. From-SVN: r152657 --- diff --git a/libgfortran/ChangeLog b/libgfortran/ChangeLog index 0984287c4b7d..b7c75e033ea8 100644 --- a/libgfortran/ChangeLog +++ b/libgfortran/ChangeLog @@ -1,3 +1,9 @@ +2009-10-11 Jerry DeLisle + + PR libgfortran/38439 + * io/format.c (parse_format_list): Correct logic for FMT_F reading vs + writing. Code clean-up. + 2009-10-11 Jerry DeLisle PR libgfortran/38439 diff --git a/libgfortran/io/format.c b/libgfortran/io/format.c index 7e46e3a25df5..97bd2da77ba7 100644 --- a/libgfortran/io/format.c +++ b/libgfortran/io/format.c @@ -933,7 +933,7 @@ parse_format_list (st_parameter_dt *dtp, bool *save_ok) tail->u.real.d = fmt->value; break; } - if (t == FMT_F || dtp->u.p.mode == WRITING) + if (t == FMT_F && dtp->u.p.mode == WRITING) { if (u != FMT_POSINT && u != FMT_ZERO) { @@ -941,13 +941,10 @@ parse_format_list (st_parameter_dt *dtp, bool *save_ok) goto finished; } } - else + else if (u != FMT_POSINT) { - if (u != FMT_POSINT) - { - fmt->error = posint_required; - goto finished; - } + fmt->error = posint_required; + goto finished; } tail->u.real.w = fmt->value;