This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libfortran/25039] New: broken formatted I/O
- From: "iwan at irs dot phy dot nrc dot ca" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 25 Nov 2005 21:25:24 -0000
- Subject: [Bug libfortran/25039] New: broken formatted I/O
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
I get a runtime error on the following simple program:
cat simple.f
program junk
read(5,'(2i9)') i1,i2
write(6,*) i1,i2
end
gfortran simple.f
./a.out
1,1
At line 2 of file simple.f
Fortran runtime error: Bad value during integer read
Contrary to that:
g77 simple.f
./a.out
1,1
1 1
A similar error occurs when reading floating point numbers
using e.g. F10.0:
cat simple1.f
program junk
read(5,'(2f9.0)') x1,x2
write(6,*) x1,x2
end
gfortran simple1.f
./a.out
1,1
At line 2 of file simple1.f
Fortran runtime error: Bad value during floating point read
g77 simple1.f
./a.out
1,1
1. 1.
--
Summary: broken formatted I/O
Product: gcc
Version: 4.0.2
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: libfortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: iwan at irs dot phy dot nrc dot ca
GCC build triplet: x86_64-unknown-linux-gnu
GCC host triplet: x86_64-unknown-linux-gnu
GCC target triplet: x86_64-unknown-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25039