diff options
author | jvdelisle <jvdelisle@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-11-16 16:12:16 +0000 |
---|---|---|
committer | jvdelisle <jvdelisle@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-11-16 16:12:16 +0000 |
commit | dae9954a08c08b0ca4481d71e1a6cbd523becb1a (patch) | |
tree | 7b23ec0d5e8e4ac0ba4d6499ea65206845372b22 /libgfortran | |
parent | 20b5d57501c6575029bb4d26cc8da62a31682751 (diff) | |
download | gcc-dae9954a08c08b0ca4481d71e1a6cbd523becb1a.tar.gz |
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@141919 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgfortran')
-rw-r--r-- | libgfortran/ChangeLog | 8 | ||||
-rw-r--r-- | libgfortran/io/read.c | 13 | ||||
-rw-r--r-- | libgfortran/io/transfer.c | 2 | ||||
-rw-r--r-- | libgfortran/io/unit.c | 2 |
4 files changed, 14 insertions, 11 deletions
diff --git a/libgfortran/ChangeLog b/libgfortran/ChangeLog index 42aca0ce1e3..1fd0263e480 100644 --- a/libgfortran/ChangeLog +++ b/libgfortran/ChangeLog @@ -1,3 +1,11 @@ +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 diff --git a/libgfortran/io/read.c b/libgfortran/io/read.c index 5fb1e3cb98f..fb39877012c 100644 --- a/libgfortran/io/read.c +++ b/libgfortran/io/read.c @@ -956,14 +956,9 @@ read_f (st_parameter_dt *dtp, const fnode *f, char *dest, int length) 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)) { @@ -984,7 +979,7 @@ read_f (st_parameter_dt *dtp, const fnode *f, char *dest, int length) } else /* BZ or BN status is enabled */ { - while (w > 0) + while (w > 0 && (isdigit (*p) || *p == ' ')) { if (*p == ' ') { diff --git a/libgfortran/io/transfer.c b/libgfortran/io/transfer.c index 8d4f785e49a..500cce95e40 100644 --- a/libgfortran/io/transfer.c +++ b/libgfortran/io/transfer.c @@ -2102,7 +2102,7 @@ data_transfer_init (st_parameter_dt *dtp, int read_flag) 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 : diff --git a/libgfortran/io/unit.c b/libgfortran/io/unit.c index 69563187553..a5d660c392d 100644 --- a/libgfortran/io/unit.c +++ b/libgfortran/io/unit.c @@ -437,6 +437,7 @@ get_internal_unit (st_parameter_dt *dtp) 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; @@ -448,7 +449,6 @@ get_internal_unit (st_parameter_dt *dtp) /* 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; |