+2006-02-27 Jerry DeLisle <jvdelisle@gcc.gnu.org>
+
+ PR libgfortran/26464
+ * io/file_pos.c (st_backspace): Flush and truncate file
+ when in AFTER_ENDFILE condition.
+ * io/transfer.c (st_read_done): Remove flush, no longer needed.
+
2006-02-24 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR libgfortran/26423
-/* Copyright (C) 2002-2003, 2005 Free Software Foundation, Inc.
+/* Copyright (C) 2002-2003, 2005, 2006 Free Software Foundation, Inc.
Contributed by Andy Vaught and Janne Blomqvist
This file is part of the GNU Fortran runtime library (libgfortran).
/* Check for special cases involving the ENDFILE record first. */
if (u->endfile == AFTER_ENDFILE)
- u->endfile = AT_ENDFILE;
+ {
+ u->endfile = AT_ENDFILE;
+ flush (u->s);
+ struncate (u->s);
+ }
else
{
if (file_position (u->s) == 0)