[patch, libfortran] PR33307 I/O read/positioning problem - in BACKSPACE
Jerry DeLisle
jvdelisle@verizon.net
Fri Sep 7 20:12:00 GMT 2007
Hi all,
I intend to commit this one liner under the simple and obvious rule shortly.
Regression tested on x86_64-gnu-linux. Tested with -m32, NIST tested.
New test case attached.
Regards,
Jerry
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.
Index: io/file_pos.c
===================================================================
--- io/file_pos.c (revision 128052)
+++ io/file_pos.c (working copy)
@@ -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
{
-------------- next part --------------
A non-text attachment was scrubbed...
Name: backspace_10.f90
Type: text/x-fortran
Size: 1220 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20070907/486b07a9/attachment.bin>
More information about the Fortran
mailing list