From d4fc670294f037e0a8e8f4bdbb7ea80640f463e5 Mon Sep 17 00:00:00 2001 From: Jerry DeLisle Date: Sun, 30 Oct 2016 22:14:01 +0000 Subject: re PR libfortran/78123 (Short reads with T edit descriptor not padding correctly) 2016-10-30 Jerry DeLisle 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 --- libgfortran/io/transfer.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'libgfortran/io') 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) { -- cgit v1.1