Commit 4665abc4 by Janus Weil Committed by Tobias Burnus

re PR fortran/32535 (namelist with private items contained in sub-sub-procedure…

re PR fortran/32535 (namelist with private items contained in sub-sub-procedure of a module rejected)

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.

From-SVN: r126706
parent 0af0580f
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 Paul Thomas <pault@gcc.gnu.org>
PR fortran/31320
......
......@@ -6969,6 +6969,8 @@ resolve_fl_namelist (gfc_symbol *sym)
{
if (!nl->sym->attr.use_assoc
&& !(sym->ns->parent == nl->sym->ns)
&& !(sym->ns->parent
&& sym->ns->parent->parent == nl->sym->ns)
&& !gfc_check_access(nl->sym->attr.access,
nl->sym->ns->default_access))
{
......
2007-07-17 Janus Weil <jaydub66@gmail.com>
PR fortran/32535
* gfortran.dg/pr32535.f90: New test.
2007-07-17 Paul Thomas <pault@gcc.gnu.org>
PR fortran/31320
! { dg-do compile }
!
! PR32535: namelist with private items contained in sub-sub-procedure of a module rejected
!
! Contributed by Janus Weil <jaydub66@gmail.com>
module mo
implicit none
real, private:: a,b,c
contains
subroutine sub
implicit none
namelist /nl1/ a,b,c
contains
subroutine subsub
implicit none
namelist /nl2/ a,b,c
end subroutine subsub
end subroutine sub
end module mo
! { dg-final { cleanup-modules "mo" } }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment