This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libfortran/36202] New: [mingw] Namelist read fails with CRLF
- From: "fxcoudert at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 10 May 2008 22:04:48 -0000
- Subject: [Bug libfortran/36202] New: [mingw] Namelist read fails with CRLF
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
gfortran.dg/namelist_44.f90 fails on mingw (both 32-bit and 64-bit) due to a
bug in namelist reading, which can be reduced to:
program gfcbug77
implicit none
character(len=128) :: file = ""
logical :: default
namelist /BLACKLIST/ file, default
integer, parameter :: nnml = 10
default = .true.
open (nnml,file='gfcbug77.nml')
read (nnml,nml=BLACKLIST)
close(nnml,status="delete")
end program gfcbug77
with gfcbug77.nml having the following content:
&blacklist
! foo
file = 'myfile'
default = F
/
with DOS-style (ie CRLF) line terminators. The CRLF that actually trigers the
error is the one after the namelist name and the space ("&blacklist ^M", where
^M is the CRLF); all others can be removed and it still fails. The error is:
At line 11 of file namelist_44.f90 (unit = 10, file = 'gfcbug77.nml')
Fortran runtime error: Cannot match namelist object name !
--
Summary: [mingw] Namelist read fails with CRLF
Product: gcc
Version: 4.4.0
Status: UNCONFIRMED
Keywords: rejects-valid
Severity: normal
Priority: P3
Component: libfortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: fxcoudert at gcc dot gnu dot org
GCC target triplet: *-*-mingw*
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36202