This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/32535] New: namelist with private items contained in sub-sub-procedure of a module rejected
- From: "burnus at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 28 Jun 2007 12:11:53 -0000
- Subject: [Bug fortran/32535] New: namelist with private items contained in sub-sub-procedure of a module rejected
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
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