From 08ee9e8569e0742406dd585c2762df31b7ae0f6f Mon Sep 17 00:00:00 2001 From: Paul Thomas Date: Tue, 31 Jul 2007 22:14:29 +0000 Subject: re PR fortran/31609 (module that calls a contained function with an ENTRY point) 2007-08-01 Paul Thomas PR fortran/31609 * resolve.c (resolve_entries): Entries declared to be module procedures must point to the function namespace. 2007-08-01 Paul Thomas PR fortran/31609 * gfortran.dg/entry_12.f90: New test. From-SVN: r127108 --- gcc/fortran/resolve.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'gcc/fortran/resolve.c') diff --git a/gcc/fortran/resolve.c b/gcc/fortran/resolve.c index e2ebc99..4b8d145 100644 --- a/gcc/fortran/resolve.c +++ b/gcc/fortran/resolve.c @@ -431,6 +431,15 @@ resolve_entries (gfc_namespace *ns) && ns->parent && ns->parent->proc_name->attr.flavor == FL_MODULE) el->sym->ns = ns; + /* Do the same for entries where the master is not a module + procedure. These are retained in the module namespace because + of the module procedure declaration. */ + for (el = el->next; el; el = el->next) + if (el->sym->ns->proc_name->attr.flavor == FL_MODULE + && el->sym->attr.mod_proc) + el->sym->ns = ns; + el = ns->entries; + /* Add an entry statement for it. */ c = gfc_get_code (); c->op = EXEC_ENTRY; -- cgit v1.1