------- Comment #1 from janus at gcc dot gnu dot org 2009-04-27 16:54 -------
Something like this should do it:
Index: gcc/fortran/parse.c
===================================================================
--- gcc/fortran/parse.c (Revision 146826)
+++ gcc/fortran/parse.c (Arbeitskopie)
@@ -3310,7 +3310,7 @@ gfc_fixup_sibling_symbols (gfc_symbol *s
sym->attr.referenced = 1;
for (ns = siblings; ns; ns = ns->sibling)
{
- gfc_find_sym_tree (sym->name, ns, 0, &st);
+ st = gfc_find_symtree (ns->sym_root, sym->name);
if (!st || (st->n.sym->attr.dummy && ns == st->n.sym->ns))
goto fixup_contained;
It seems a bit unfortunate that we have two functions with almost the same name
(gfc_find_sym_tree and gfc_find_symtree), which do almost the same, but not
quite. The little difference is important here. Maybe one of these functions
should be renamed to make the usage clearer?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39930