This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/46849] [OOP] MODULE PROCEDURE resolution does not work in BLOCK or SELECT TYPE


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);


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]