This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/24459] New: gfortran namelist regression
- From: "ed at eh3 dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 20 Oct 2005 18:23:37 -0000
- Subject: [Bug fortran/24459] New: gfortran namelist regression
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
I don't know if this is an actual regression but using gcc-4.0.2
built with:
$ ../gcc-4.0.2/configure --prefix=/opt/gcc-4.0.2 \
--enable-languages=c,c++,f95 --program-suffix=-4.0.2
the program:
$ cat diag.f
program diag
INTEGER nd
PARAMETER ( nd = 5 )
CHARACTER*(8) names(nd,nd)
NAMELIST / diags / names
OPEN(UNIT=20,FILE='diag.nml',STATUS='OLD')
READ(20,NML=diags)
WRITE(*,NML=diags)
STOP
END
will work with:
$ cat diag.nml
&DIAGS
NAMES = 'ETAN' 'ETANSQ' 'DETADT2' 'PHIBOT' 'PHIBOTSQ' '' ''
'' '' '' '' '' '' ''
'' '' '' '' '' '' ''
'' '' '' ''/
but fails with the message:
$ ./diag
At line 7 of file diag.f
Fortran runtime error: Cannot match namelist object name 'etansq
when reading:
$ cat diag.nml
&diags
names(1,1) = 'ETAN ','ETANSQ ','DETADT2 ','PHIBOT ','PHIBOTSQ',
/
The reason that it appears to be a regression is that both namelist
files work nicely with basically all g77 versions shipped in recent
years and with a large number of both past and present commercial
Fortran compilers including Intel v5--v9, PGI, IBM xlf, and Sun.
In my (humble!) opinion, it would be a shame if the namelist indexing
("implicit" indexing?) is lost since large namelist files are more
legible using it. And, existing namelist files will require a fairly
substantial amount of editing to convert between the two types of
formatting.
--
Summary: gfortran namelist regression
Product: gcc
Version: 4.0.2
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: ed at eh3 dot com
GCC build triplet: i686-pc-linux-gnu
GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24459