+2008-11-16 Jerry DeLisle <jvdelisle@gcc.gnu.org>
+
+ PR libfortran/38097
+ * io/read.c (read_f): Initialize exponent. Fix comment. Set loop
+ conditions for BZ/BN.
+ * io/unit.c (get_internal_unit): Initialize flags.blank.
+ * io/transfer.c (data_transfer_init): Fix whitespace.
+
2008-11-15 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR libfortran/37294
of the exponent in order to take account of the scale factor and
the d parameter before explict conversion takes place. */
exp2:
- if (!isdigit (*p))
- goto bad_float;
-
- exponent = *p - '0';
- p++;
- w--;
-
- if (dtp->u.p.blank_status == BLANK_UNSPECIFIED) /* Normal processing of exponent */
+ /* Normal processing of exponent */
+ exponent = 0;
+ if (dtp->u.p.blank_status == BLANK_UNSPECIFIED)
{
while (w > 0 && isdigit (*p))
{
}
else /* BZ or BN status is enabled */
{
- while (w > 0)
+ while (w > 0 && (isdigit (*p) || *p == ' '))
{
if (*p == ' ')
{
if (dtp->u.p.blank_status == BLANK_UNSPECIFIED)
dtp->u.p.blank_status = dtp->u.p.current_unit->flags.blank;
-
+
/* Check the delim mode. */
dtp->u.p.current_unit->delim_status
= !(cf & IOPARM_DT_HAS_DELIM) ? DELIM_UNSPECIFIED :
iunit->flags.access = ACCESS_SEQUENTIAL;
iunit->flags.action = ACTION_READWRITE;
+ iunit->flags.blank = BLANK_UNSPECIFIED;
iunit->flags.form = FORM_FORMATTED;
iunit->flags.pad = PAD_YES;
iunit->flags.status = STATUS_UNSPECIFIED;
/* Initialize the data transfer parameters. */
dtp->u.p.advance_status = ADVANCE_YES;
- dtp->u.p.blank_status = BLANK_UNSPECIFIED;
dtp->u.p.seen_dollar = 0;
dtp->u.p.skips = 0;
dtp->u.p.pending_spaces = 0;