[Bug fortran/31609] module that calls a contained function with an ENTRY point

jvdelisle at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Thu Jul 26 05:35:00 GMT 2007



------- Comment #9 from jvdelisle at gcc dot gnu dot org  2007-07-26 05:35 -------
This fixes the infinite recursive loop and fixes a segfault I was getting on
the original test case.  The test case in comment #8 is something different.

Index: resolve.c
===================================================================
--- resolve.c   (revision 126937)
+++ resolve.c   (working copy)
@@ -789,8 +789,16 @@ generic_sym (gfc_symbol *sym)
     return 0;

   gfc_find_symbol (sym->name, sym->ns->parent, 1, &s);
+  
+  if (s != NULL)
+    {
+      if (s == sym)
+       return 0;
+      else
+       return generic_sym (s);
+    }

-  return (s == NULL) ? 0 : generic_sym (s);
+  return 0;
 }




-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31609



More information about the Gcc-bugs mailing list