This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libfortran/25139] [4.1/4.2 regression] "Invalid argument" error on 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: 13 Dec 2005 15:21:48 -0000
- Subject: [Bug libfortran/25139] [4.1/4.2 regression] "Invalid argument" error on I/O
- References: <bug-25139-10129@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #10 from dir at lanl dot gov 2005-12-13 15:21 -------
Removing the constraint of no read after write gives a slightly shorter one -
[dranta:~/tests/gfortran-D] dir% gfortran -o write11 write11.f
[dranta:~/tests/gfortran-D] dir% write11
At line 14 of file write11.f
Fortran runtime error: Invalid argument
[dranta:~/tests/gfortran-D] dir% cat write11.f
integer :: i = 1
dimension data(5)
do 10 i=1,5
data(i)=i
10 continue
open(unit=11,status='scratch',form='unformatted')
write(11)data
read(11,end= 1000 )data
1000 continue
backspace 11
rewind 11
read(11,end= 1001 )data
1001 continue
read(11,end= 1002 )data
1002 continue
close(11)
end
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25139