This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libfortran/26499] gfortran - End of File incorrectly positioned after binary I/O.
- From: "jvdelisle at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 3 Mar 2006 23:05:56 -0000
- Subject: [Bug libfortran/26499] gfortran - End of File incorrectly positioned after binary I/O.
- References: <bug-26499-10129@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #10 from jvdelisle at gcc dot gnu dot org 2006-03-03 23:05 -------
The case in Comment #9 is also very simple. I got myself again. I saw this
before, but because I did not have a test case that failed, I left it alone.
With this fix in file_pos.c all of Dale's rewind tests pass up to number of
operations equals 9 (262144 tests). I will submit the updated patch soon.
In st_rewind change this:
if (u->mode == WRITING)
{
flush (u->s);
struncate (u->s);
}
u->mode = READING;
to this:
flush (u->s);
if (u->mode == WRITING)
struncate (u->s);
u->mode = READING;
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26499