public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/56660] New: Fails to read NAMELIST with certain form array syntax
@ 2013-03-20  7:40 burnus at gcc dot gnu.org
  2013-03-30 14:49 ` [Bug fortran/56660] " burnus at gcc dot gnu.org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: burnus at gcc dot gnu.org @ 2013-03-20  7:40 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56660

             Bug #: 56660
           Summary: Fails to read NAMELIST with certain form array syntax
    Classification: Unclassified
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Keywords: wrong-code
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: burnus@gcc.gnu.org
                CC: jvdelisle@gcc.gnu.org, tilo@tilo-schwarz.de
        Depends on: 51825


Another namelist failure, found by Jerry. 
See also PR 49791, PR 51825, PR 55117, PR 52512.


When reading the file, gfortran fails with:
  At line 17 of file pr51825-3.f90 (unit = 99, file = 'nml.dat')
  Fortran runtime error: Cannot match namelist object name 'bb'

Using NAG, one gets the output:
 &NAML1 TRACER = XX F XX F XX F/
 &NAML1 TRACER = aa T bb T XX F/

(There are plenty ways of outputting this data - as long as the data is there.)



type ptracer
   character(len = 2)  :: sname
   logical              :: lini
end type ptracer
type(ptracer) , dimension(3) :: tracer
namelist/naml1/  tracer

tracer(:) = ptracer('XXX', .false.)
write (*, nml=naml1)

open (99, file='nml.dat', status="replace")
write(99,*) "&naml1"
write(99,*) "   tracer(:)   = 'aa' , .true."
write(99,*) "   tracer(2)   = 'bb' , .true."
write(99,*) "/"
rewind(99)
read (99, nml=naml1)
write (*, nml=naml1)
close (99, status="delete")
end


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

end of thread, other threads:[~2014-12-06 22:36 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-20  7:40 [Bug fortran/56660] New: Fails to read NAMELIST with certain form array syntax burnus at gcc dot gnu.org
2013-03-30 14:49 ` [Bug fortran/56660] " burnus at gcc dot gnu.org
2013-04-01 20:33 ` jvdelisle at gcc dot gnu.org
2013-04-01 21:00 ` jvdelisle at gcc dot gnu.org
2013-05-05  0:37 ` jvdelisle at gcc dot gnu.org
2014-01-05 12:52 ` dominiq at lps dot ens.fr
2014-12-06 22:36 ` dominiq at lps dot ens.fr

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).