From 37e47ee96393168103a35a792e40b3c808ebc192 Mon Sep 17 00:00:00 2001 From: Paul Thomas Date: Tue, 28 Mar 2006 10:13:50 +0000 Subject: re PR fortran/26779 (Internal module procedure may not have private type dummy arguments) 2006-03-28 Paul Thomas PR fortran/26779 *resolve.c (resolve_fl_procedure): Do not check the access of derived types for internal procedures. 2006-03-28 Paul Thomas PR fortran/26779 * gfortran.dg/private_type_5.f90: New test. From-SVN: r112442 --- gcc/fortran/resolve.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'gcc/fortran/resolve.c') diff --git a/gcc/fortran/resolve.c b/gcc/fortran/resolve.c index 548b67e..562338f 100644 --- a/gcc/fortran/resolve.c +++ b/gcc/fortran/resolve.c @@ -4834,9 +4834,13 @@ resolve_fl_procedure (gfc_symbol *sym, int mp_flag) } } - /* Ensure that derived type formal arguments of a public procedure - are not of a private type. */ - if (gfc_check_access(sym->attr.access, sym->ns->default_access)) + /* Ensure that derived type for are not of a private type. Internal + module procedures are excluded by 2.2.3.3 - ie. they are not + externally accessible and can access all the objects accesible in + the host. */ + if (!(sym->ns->parent + && sym->ns->parent->proc_name->attr.flavor == FL_MODULE) + && gfc_check_access(sym->attr.access, sym->ns->default_access)) { for (arg = sym->formal; arg; arg = arg->next) { -- cgit v1.1