diff options
author | Jerry DeLisle <jvdelisle@gcc.gnu.org> | 2009-09-19 04:41:38 +0000 |
---|---|---|
committer | Jerry DeLisle <jvdelisle@gcc.gnu.org> | 2009-09-19 04:41:38 +0000 |
commit | bf187ce8befc5d9e721d2f06c5c4ee7b69bebbf4 (patch) | |
tree | e40c5e223763b30b127cc54077b07309373d38af | |
parent | 70e4295998c7055fac16a7c55889676a45f6337c (diff) | |
download | gcc-bf187ce8befc5d9e721d2f06c5c4ee7b69bebbf4.zip gcc-bf187ce8befc5d9e721d2f06c5c4ee7b69bebbf4.tar.gz gcc-bf187ce8befc5d9e721d2f06c5c4ee7b69bebbf4.tar.bz2 |
re PR fortran/41328 (bad iostat when reading DOS file in a character array (non-advancing))
2009-09-18 Jerry DeLisle <jvdelisle@gcc.gnu.org>
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.
From-SVN: r151877
-rw-r--r-- | libgfortran/ChangeLog | 7 | ||||
-rw-r--r-- | libgfortran/io/transfer.c | 2 |
2 files changed, 8 insertions, 1 deletions
diff --git a/libgfortran/ChangeLog b/libgfortran/ChangeLog index 3469814..af4cbfd 100644 --- a/libgfortran/ChangeLog +++ b/libgfortran/ChangeLog @@ -1,3 +1,10 @@ +2009-09-18 Jerry DeLisle <jvdelisle@gcc.gnu.org> + + 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 <jvdelisle@gcc.gnu.org> PR libgfortran/41328 diff --git a/libgfortran/io/transfer.c b/libgfortran/io/transfer.c index 2362a15..4525bb4 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 { |