[Bug libfortran/25139] [4.1/4.2 regression] "Invalid argument" error on I/O
jvdelisle at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Thu Dec 22 22:49:00 GMT 2005
------- Comment #28 from jvdelisle at gcc dot gnu dot org 2005-12-22 22:49 -------
On i686-pc-linux-gnu:
$ cat back3.f
integer dat(5)
dat = (/ 0, 0, 0, 0, 1 /)
write(11) dat,dat,dat,dat
rewind 11
write(11) dat
read(11,end=1008) dat
call abort()
1008 continue
! backspace 11
! write(11) dat
read(11,end=1011) dat
print *, 'failed'
1011 continue
backspace 11
backspace 11
end
$ gfc back3.f
$ ./a.out
At line 11 of file back3.f
Fortran runtime error: Read past ENDFILE record
$ ifc back3.f
$ ./a.out
$
gfortran and ifort give different results with those two lines commented out.
The other cases work fine.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25139
More information about the Gcc-bugs
mailing list