diff options
author | bdavis <bdavis@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-11-27 23:35:47 +0000 |
---|---|---|
committer | bdavis <bdavis@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-11-27 23:35:47 +0000 |
commit | d1569769a46740bbdd6d7919ff818fc2a81dc4ed (patch) | |
tree | 65d480795eff18a7ac3db7791e5d0314e39c6456 /libgfortran | |
parent | 37419db7707bdf2c87c6c5afcbddebfbacb215db (diff) | |
download | gcc-d1569769a46740bbdd6d7919ff818fc2a81dc4ed.tar.gz |
2004-11-27 Bud Davis <bdavis9659@comcast.net>
PR fortran/18364
* gfortran.dg/endfile.f90: New test.
* io/endfile.c (st_endfile): flush the stream before truncating.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@91400 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgfortran')
-rw-r--r-- | libgfortran/ChangeLog | 5 | ||||
-rw-r--r-- | libgfortran/io/endfile.c | 1 |
2 files changed, 6 insertions, 0 deletions
diff --git a/libgfortran/ChangeLog b/libgfortran/ChangeLog index f4019cfe740..a27c75d77d5 100644 --- a/libgfortran/ChangeLog +++ b/libgfortran/ChangeLog @@ -1,3 +1,8 @@ +2004-11-27 Bud Davis <bdavis9659@comcast.net> + + PR fortran/18364 + * io/endfile.c (st_endfile): flush the stream before truncating. + 2004-11-25 Kelley Cook <kcook@gcc.gnu.org> * configure: Regenerate for libtool reversion. diff --git a/libgfortran/io/endfile.c b/libgfortran/io/endfile.c index ca40fe4eb79..d8462a3faed 100644 --- a/libgfortran/io/endfile.c +++ b/libgfortran/io/endfile.c @@ -38,6 +38,7 @@ st_endfile (void) if (u->current_record) next_record (1); + flush(u->s); struncate (u->s); u->endfile = AFTER_ENDFILE; } |