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: "dir at lanl dot gov" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 2 Mar 2006 14:02:41 -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 #7 from dir at lanl dot gov 2006-03-02 14:02 -------
Hi Jerry,
As you may have guessed, I added this problem to the things that my program
looks for. You got that one and all the ones like it, but here is another one
from a slightly different class (rewind after reading a eof instead of a
backspace after reading a eof) -
[dranta:~/tests/gfortran-D] dir% gfortran -o write28 write28.f
[dranta:~/tests/gfortran-D] dir% write28
Abort
[dranta:~/tests/gfortran-D] dir% cat write28.f
program test
dimension idata(1011)
open(unit=11,form='unformatted')
write(11)idata
write(11)idata
read(11,end= 1000 )idata
call abort()
1000 continue
rewind 11
write(11)idata
close(11,status='keep')
open(unit=11,form='unformatted')
rewind 11
read(11)idata
read(11, end=250)idata
call abort()
250 continue
close(11,status='delete')
stop
end
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26499