public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/32535]  New: namelist with private items contained in sub-sub-procedure of a module rejected
@ 2007-06-28 12:12 burnus at gcc dot gnu dot org
  2007-07-08 21:06 ` [Bug fortran/32535] " patchapp at dberlin dot org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: burnus at gcc dot gnu dot org @ 2007-06-28 12:12 UTC (permalink / raw)
  To: gcc-bugs

Janus, how about submitting a patch for this bug including a testcase?

As Janus Weil found out:
http://gcc.gnu.org/ml/fortran/2007-06/msg00488.html

If a namelist in a procedure contained in a module procedure contains a private
item as element, a bogus error message is printed:
   Error: PRIVATE symbol 'r' cannot be member of PUBLIC namelist at (1)

This fails if the symbol is not in the parent, but in the parent->parent
namespace.
One solution would be to add
    && !(sym->ns->parent->parent == nl->sym->ns)

module mod
  real, private :: r
contains
  subroutine x
  contains
    subroutine y
      namelist /n/ r
    end subroutine y
  end subroutine x
end module mod
end


-- 
           Summary: namelist with private items contained in sub-sub-
                    procedure of a module rejected
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Keywords: rejects-valid
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: burnus at gcc dot gnu dot org


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


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

end of thread, other threads:[~2007-07-17 21:34 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-06-28 12:12 [Bug fortran/32535] New: namelist with private items contained in sub-sub-procedure of a module rejected burnus at gcc dot gnu dot org
2007-07-08 21:06 ` [Bug fortran/32535] " patchapp at dberlin dot org
2007-07-17 21:33 ` burnus at gcc dot gnu dot org
2007-07-17 21:34 ` burnus 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).