This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/31609] gfortran segfaults when compiling a module that calls a contained function with an ENTRY point
- From: "jvdelisle at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 6 Jun 2007 01:59:42 -0000
- Subject: [Bug fortran/31609] gfortran segfaults when compiling a module that calls a contained function with an ENTRY point
- References: <bug-31609-14284@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #2 from jvdelisle at gcc dot gnu dot org 2007-06-06 01:59 -------
The problem is here in resolve.c:
static int
generic_sym (gfc_symbol *sym)
{
gfc_symbol *s;
if (sym->attr.generic ||
(sym->attr.intrinsic && gfc_generic_intrinsic (sym->name)))
return 1;
if (was_declared (sym) || sym->ns->parent == NULL)
return 0;
gfc_find_symbol (sym->name, sym->ns->parent, 1, &s);
return (s == NULL) ? 0 : generic_sym (s);
}
gfc_find_symbol is returning the same symbol that is called with generic_sym
and thus we are in an infinite loop, calling genric_sym with that same symbol
over and over again.
I think this is related to 32157. gfortran does not discriminate symbols of
the same name but with different scope or type.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31609