diff --git a/libgfortran/ChangeLog b/libgfortran/ChangeLog index 346981415f1..af4cbfddcdb 100644 --- a/libgfortran/ChangeLog +++ b/libgfortran/ChangeLog @@ -1,3 +1,10 @@ +2009-09-18 Jerry DeLisle + + PR libgfortran/41328 + * io/transfer.c (read_sf): Set at_eof flag on short read if any + characters were successfully read so that EOF condition with no EOR + marker succeeds. + 2009-09-12 Jerry DeLisle PR libgfortran/41328 diff --git a/libgfortran/io/transfer.c b/libgfortran/io/transfer.c index 2362a154592..4525bb49c88 100644 --- a/libgfortran/io/transfer.c +++ b/libgfortran/io/transfer.c @@ -291,7 +291,7 @@ read_sf (st_parameter_dt *dtp, int * length, int no_error) some other stuff. Set the relevant flags. */ if (lorig > *length && !dtp->u.p.sf_seen_eor && !seen_comma) { - if (no_error) + if (n > 0 || no_error) dtp->u.p.at_eof = 1; else {