diff options
author | Jerry DeLisle <jvdelisle@gcc.gnu.org> | 2016-10-30 22:14:01 +0000 |
---|---|---|
committer | Jerry DeLisle <jvdelisle@gcc.gnu.org> | 2016-10-30 22:14:01 +0000 |
commit | d4fc670294f037e0a8e8f4bdbb7ea80640f463e5 (patch) | |
tree | ad49bed54951ceabdcb4409b96fed44a089970a1 /libgfortran/io/transfer.c | |
parent | 396e56d2da7935f96f4ca133c359668cc6c98eaf (diff) | |
download | gcc-d4fc670294f037e0a8e8f4bdbb7ea80640f463e5.zip gcc-d4fc670294f037e0a8e8f4bdbb7ea80640f463e5.tar.gz gcc-d4fc670294f037e0a8e8f4bdbb7ea80640f463e5.tar.bz2 |
re PR libfortran/78123 (Short reads with T edit descriptor not padding correctly)
2016-10-30 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR fortran/78123
* io/transfer.c (formatted_transfer_scalar_read): Clear seen_eor
only if we have tabbed to left of current position.
* gfortran.dg/fmt_t_9.f: New test.
From-SVN: r241691
Diffstat (limited to 'libgfortran/io/transfer.c')
-rw-r--r-- | libgfortran/io/transfer.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libgfortran/io/transfer.c b/libgfortran/io/transfer.c index b8eb5ed..5830362 100644 --- a/libgfortran/io/transfer.c +++ b/libgfortran/io/transfer.c @@ -1579,7 +1579,8 @@ formatted_transfer_scalar_read (st_parameter_dt *dtp, bt type, void *p, int kind dtp->u.p.current_unit->bytes_left -= dtp->u.p.sf_seen_eor; dtp->u.p.skips -= dtp->u.p.sf_seen_eor; bytes_used = pos; - dtp->u.p.sf_seen_eor = 0; + if (dtp->u.p.pending_spaces == 0) + dtp->u.p.sf_seen_eor = 0; } if (dtp->u.p.skips < 0) { |