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/31609] gfortran segfaults when compiling a module that calls a contained function with an ENTRY point



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


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