aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/fortran')
-rw-r--r--gcc/fortran/ChangeLog6
-rw-r--r--gcc/fortran/resolve.c10
2 files changed, 13 insertions, 3 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog
index 6d19805..d2a1e4f 100644
--- a/gcc/fortran/ChangeLog
+++ b/gcc/fortran/ChangeLog
@@ -1,3 +1,9 @@
+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-27 Jakub Jelinek <jakub@redhat.com>
* io.c (check_io_constraints): Don't look at
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)
{