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
Subject: Bug number PR 32535 A patch for this bug has been added to the patch tracker. The mailing list url for the patch is http://gcc.gnu.org/ml/gcc-patches/2007-07/msg00650.html
Subject: Bug 32535 Author: burnus Date: Tue Jul 17 21:33:34 2007 New Revision: 126706 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=126706 Log: 2007-07-17 Janus Weil <jaydub66@gmail.com> PR fortran/32535 * resolve.c (resolve_fl_namelist): Check for namelist private components in contained subprograms. 2007-07-17 Janus Weil <jaydub66@gmail.com> PR fortran/32535 * gfortran.dg/pr32535.f90: New test. Added: trunk/gcc/testsuite/gfortran.dg/pr32535.f90 Modified: trunk/gcc/fortran/ChangeLog trunk/gcc/fortran/resolve.c trunk/gcc/testsuite/ChangeLog
FIXED in the trunk; no regression => no backporting.