aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/resolve.c
diff options
context:
space:
mode:
authorPaul Thomas <pault@gcc.gnu.org>2006-03-28 10:13:50 +0000
committerPaul Thomas <pault@gcc.gnu.org>2006-03-28 10:13:50 +0000
commit37e47ee96393168103a35a792e40b3c808ebc192 (patch)
tree67e215c9e639e3eb52fdc4220f02441cfda969a5 /gcc/fortran/resolve.c
parent7f166b0a8e4cf02f0e297429471ab95078820a48 (diff)
downloadgcc-37e47ee96393168103a35a792e40b3c808ebc192.zip
gcc-37e47ee96393168103a35a792e40b3c808ebc192.tar.gz
gcc-37e47ee96393168103a35a792e40b3c808ebc192.tar.bz2
re PR fortran/26779 (Internal module procedure may not have private type dummy arguments)
2006-03-28 Paul Thomas <pault@gcc.gnu.org> PR fortran/26779 *resolve.c (resolve_fl_procedure): Do not check the access of derived types for internal procedures. 2006-03-28 Paul Thomas <pault@gcc.gnu.org> PR fortran/26779 * gfortran.dg/private_type_5.f90: New test. From-SVN: r112442
Diffstat (limited to 'gcc/fortran/resolve.c')
-rw-r--r--gcc/fortran/resolve.c10
1 files changed, 7 insertions, 3 deletions
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)
{