re PR fortran/33307 (I/O read/positioning problem)
authorJerry DeLisle <jvdelisle@gcc.gnu.org>
Fri, 7 Sep 2007 20:16:05 +0000 (20:16 +0000)
committerJerry DeLisle <jvdelisle@gcc.gnu.org>
Fri, 7 Sep 2007 20:16:05 +0000 (20:16 +0000)
2007-09-07  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

PR libfortran/33307
* io/filepos.c (st_backspace): Don't truncate when already at the end
of the file.

From-SVN: r128253

libgfortran/ChangeLog
libgfortran/io/file_pos.c

index 3042685c76a251d1efb128e69ae8270a5b73beee..4c92333266c443722dab5e629b31107899207591 100644 (file)
@@ -1,3 +1,9 @@
+2007-09-07  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
+
+       PR libfortran/33307
+       * io/filepos.c (st_backspace): Don't truncate when already at the end
+       of the file.
+       
 2007-09-07  Uros Bizjak  <ubizjak@gmail.com>
 
        * config/fpu-387.h: Include cpuid.h.
index c0412e838796b7c50144530b0d66a587aa9c2029..96e5e2437874aab22dc3d29cbcbdf58b25448851 100644 (file)
@@ -213,7 +213,6 @@ st_backspace (st_parameter_filepos *fpp)
       u->endfile = AT_ENDFILE;
       u->flags.position = POSITION_APPEND;
       flush (u->s);
-      struncate (u->s);
     }
   else
     {