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: 3 Mar 2006 14:51:32 -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 #9 from dir at lanl dot gov 2006-03-03 14:51 -------
That got the one in comment #7. Here is the next one -
[dranta:~/tests/gfortran-D] dir% g77 -o write29 write29.f
[dranta:~/tests/gfortran-D] dir% write29
[dranta:~/tests/gfortran-D] dir% gfortran -o write29 write29.f
[dranta:~/tests/gfortran-D] dir% write29
Abort
[dranta:~/tests/gfortran-D] dir% cat write29.f
program test
dimension idata(1011)
open(unit=11,form='unformatted')
idata(1) = -705
idata( 1011) = -706
write(11)idata
idata(1) = -706
idata( 1011) = -707
write(11)idata
idata(1) = -707
idata( 1011) = -708
write(11)idata
read(11,end= 1000 )idata
call abort()
1000 continue
rewind 11
read(11,end= 1001 )idata
if(idata(1).ne. -705.or.idata( 1011).ne. -706)call abort()
1001 continue
close(11,status='keep')
open(unit=11,form='unformatted')
rewind 11
read(11)idata
if(idata(1).ne.-705)then
call abort()
endif
read(11)idata
if(idata(1).ne.-706)then
call abort()
endif
read(11)idata
if(idata(1).ne.-707)then
call abort()
endif
close(11,status='delete')
stop
end
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26499