aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran
diff options
context:
space:
mode:
authorPaul Thomas <pault@gcc.gnu.org>2007-07-31 22:14:29 +0000
committerPaul Thomas <pault@gcc.gnu.org>2007-07-31 22:14:29 +0000
commit08ee9e8569e0742406dd585c2762df31b7ae0f6f (patch)
tree961f07e69994ec9592dc4674d7d25ec987402250 /gcc/fortran
parent13e7cedb76dd9a0749e1fd739ddcc188fd6dfde5 (diff)
downloadgcc-08ee9e8569e0742406dd585c2762df31b7ae0f6f.zip
gcc-08ee9e8569e0742406dd585c2762df31b7ae0f6f.tar.gz
gcc-08ee9e8569e0742406dd585c2762df31b7ae0f6f.tar.bz2
re PR fortran/31609 (module that calls a contained function with an ENTRY point)
2007-08-01 Paul Thomas <pault@gcc.gnu.org> PR fortran/31609 * resolve.c (resolve_entries): Entries declared to be module procedures must point to the function namespace. 2007-08-01 Paul Thomas <pault@gcc.gnu.org> PR fortran/31609 * gfortran.dg/entry_12.f90: New test. From-SVN: r127108
Diffstat (limited to 'gcc/fortran')
-rw-r--r--gcc/fortran/ChangeLog6
-rw-r--r--gcc/fortran/resolve.c9
2 files changed, 15 insertions, 0 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog
index d7de098..4acddfd 100644
--- a/gcc/fortran/ChangeLog
+++ b/gcc/fortran/ChangeLog
@@ -1,3 +1,9 @@
+2007-08-01 Paul Thomas <pault@gcc.gnu.org>
+
+ PR fortran/31609
+ * resolve.c (resolve_entries): Entries declared to be module
+ procedures must point to the function namespace.
+
2007-07-31 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
PR fortran/32938
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;