[Bug fortran/43517] New: spurious end-of-file condition when namelist read follows formatted read
michael dot a dot richmond at nasa dot gov
gcc-bugzilla@gcc.gnu.org
Thu Mar 25 15:02:00 GMT 2010
The following bug exists in all ports. It applies to gfortran 4.4.4 and 4.5. It
does not apply to gfortran 4.4.0, 4.4.1, 4.4.2, 4.4.3, or any 4.3 version.
I compile and run the following program:
PROGRAM main
NAMELIST /name/ j
OPEN (10,FILE='file.txt',STATUS='OLD',FORM='FORMATTED')
READ (10,5000) i, idum
5000 FORMAT(2I5,4X) ! This FORMAT is crucial to the bug
PRINT *, "i =", i, "as expected"
READ (10,name,END=999)
STOP
999 PRINT *, "Spurious end of file condition"
END PROGRAM main
The file.txt file contains the following:
999999
$name
j=0,
/
The program prints:
i = 99999 as expected
Spurious end of file condition
--
Summary: spurious end-of-file condition when namelist read
follows formatted read
Product: gcc
Version: 4.5.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: michael dot a dot richmond at nasa dot gov
GCC build triplet: all
GCC host triplet: all
GCC target triplet: all
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43517
More information about the Gcc-bugs
mailing list