PR libgfortran/38439
* io/format.c (parse_format_list): Correct logic for FMT_F reading vs
writing. Code clean-up.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@152657
138bc75d-0d04-0410-961f-
82ee72b054a4
2009-10-11 Jerry DeLisle <jvdelisle@gcc.gnu.org>
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 <jvdelisle@gcc.gnu.org>
+
+ PR libgfortran/38439
* io/format.c (parse_format_list): Add check for tokens not allowed
after P specifier. Fix comments. Remove un-needed code. Fix the
default exponent list. Correct pointer assignment error.
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)
{
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;