public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "burnus at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/56660] New: Fails to read NAMELIST with certain form array syntax
Date: Wed, 20 Mar 2013 07:40:00 -0000	[thread overview]
Message-ID: <bug-56660-4@http.gcc.gnu.org/bugzilla/> (raw)


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


             reply	other threads:[~2013-03-20  7:40 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-20  7:40 burnus at gcc dot gnu.org [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-56660-4@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).