[Bug fortran/46849] [OOP] MODULE PROCEDURE resolution does not work in BLOCK or SELECT TYPE
janus at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon Dec 13 21:59:00 GMT 2010
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46849
--- Comment #4 from janus at gcc dot gnu.org 2010-12-13 21:59:21 UTC ---
(In reply to comment #3)
> Here is a reduced test case for the rejects-valid part, without CLASS and
> ISO_C_BINDING:
Not sure if it's the perfectly right thing to do, but the following patch fixes
the test cases in comment #3 and #1:
Index: gcc/fortran/symbol.c
===================================================================
--- gcc/fortran/symbol.c (revision 167765)
+++ gcc/fortran/symbol.c (working copy)
@@ -2717,7 +2717,7 @@ gfc_get_sym_tree (const char *name, gfc_namespace
/* This doesn't usually happen during resolution. */
if (ns == NULL)
- ns = gfc_current_ns;
+ ns = gfc_find_proc_namespace (gfc_current_ns);
/* Try to find the symbol in ns. */
st = gfc_find_symtree (ns->sym_root, name);
More information about the Gcc-bugs
mailing list