public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/24459]  New: gfortran namelist regression
@ 2005-10-20 18:23 ed at eh3 dot com
  2005-10-20 19:53 ` [Bug fortran/24459] " ed at eh3 dot com
                   ` (23 more replies)
  0 siblings, 24 replies; 25+ messages in thread
From: ed at eh3 dot com @ 2005-10-20 18:23 UTC (permalink / raw)
  To: gcc-bugs

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


^ permalink raw reply	[flat|nested] 25+ messages in thread

end of thread, other threads:[~2007-01-10 19:01 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-10-20 18:23 [Bug fortran/24459] New: gfortran namelist regression ed at eh3 dot com
2005-10-20 19:53 ` [Bug fortran/24459] " ed at eh3 dot com
2005-10-21 22:27 ` [Bug libfortran/24459] gfortran namelist problem pinskia at gcc dot gnu dot org
2005-10-26  2:44 ` jvdelisle at gcc dot gnu dot org
2005-10-30  2:59 ` jvdelisle at gcc dot gnu dot org
2005-11-02  6:41 ` jvdelisle at gcc dot gnu dot org
2005-11-02 13:12 ` ed at eh3 dot com
2005-11-24  7:21 ` jvdelisle at gcc dot gnu dot org
2005-11-24 16:26 ` ed at eh3 dot com
2005-11-24 17:25 ` jvdelisle at gcc dot gnu dot org
2005-11-25 19:44 ` jvdelisle at gcc dot gnu dot org
2005-12-04 19:54 ` ed at eh3 dot com
2005-12-04 23:11 ` jvdelisle at gcc dot gnu dot org
2006-04-22 23:23 ` jvdelisle at gcc dot gnu dot org
2006-05-02  0:02 ` jvdelisle at gcc dot gnu dot org
2006-05-02 16:21 ` ed at eh3 dot com
2006-05-15 19:30 ` patchapp at dberlin dot org
2006-05-20  7:15 ` jvdelisle at gcc dot gnu dot org
2006-05-20  7:20 ` [Bug libfortran/24459] [4.1 Only] " jvdelisle at gcc dot gnu dot org
2006-05-21  1:56 ` jvdelisle at gcc dot gnu dot org
2006-05-29  5:19 ` jvdelisle at gcc dot gnu dot org
2006-05-29  5:22 ` jvdelisle at gcc dot gnu dot org
2006-05-29  5:23 ` jvdelisle at gcc dot gnu dot org
2007-01-02  4:36 ` jvdelisle at gcc dot gnu dot org
2007-01-10 19:01 ` pinskia at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).