This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libfortran/26499] gfortran - End of File incorrectly positioned after binary I/O.



------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]