------- Comment #9 from kargl at gcc dot gnu dot org 2008-11-24 20:24 -------
(In reply to comment #8)
> > This looks like a missing or wrong initialisation.
>
> Confirmed, it's 'name' in match_deferred_characteristics:
>
> char name[GFC_MAX_SYMBOL_LEN + 1];
> [...]
> /* Set the function locus correctly. If we have not found the
> function name, there is an error. */
> gfc_match ("function% %n", name);
This should probably be
m = gfc_match ("function% %n", name);
> if (m == MATCH_YES && strcmp (name, gfc_current_block ()->name) == 0)
Otherwise, the 'm == MATCH_YES' is using an old value.
> {
> gfc_current_block ()->declared_at = gfc_current_locus;
> gfc_commit_symbols ();
> }
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37319