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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@127108
138bc75d-0d04-0410-961f-
82ee72b054a4
+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
&& 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;
+2007-08-01 Paul Thomas <pault@gcc.gnu.org>
+
+ PR fortran/31609
+ * gfortran.dg/entry_12.f90: New test.
+
2007-07-31 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
PR fortran/32938
--- /dev/null
+! { dg-do run }\r
+! Tests the fix for pr31609, where module procedure entries found\r
+! themselves in the wrong namespace. This test checks that all\r
+! combinations of generic and specific calls work correctly.\r
+!\r
+! Contributed by Paul Thomas <pault@gcc.gnu.org> as comment #8 to the pr.\r
+!\r
+MODULE ksbin1_aux_mod\r
+ interface foo\r
+ module procedure j\r
+ end interface\r
+ interface bar\r
+ module procedure k\r
+ end interface\r
+ interface foobar\r
+ module procedure j, k\r
+ end interface\r
+ CONTAINS\r
+ FUNCTION j () \r
+ j = 1\r
+ return\r
+ ENTRY k (i) \r
+ k = 2\r
+ END FUNCTION j\r
+END MODULE ksbin1_aux_mod\r
+\r
+ use ksbin1_aux_mod\r
+ if (any ((/foo (), bar (99), foobar (), foobar (99), j (), k (99)/) .ne. &\r
+ (/1, 2, 1, 2, 1, 2/))) Call abort ()\r
+end\r