------- Comment #11 from kargl at gcc dot gnu dot org 2008-11-24 20:46 ------- (In reply to comment #10) > > 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. > > But in this case the first assignment to 'm' would be dead. What about > > if (m == MATCH_YES > && gfc_match ("function% %n", name) == MATCH_YES > && strcmp (name, gfc_current_block ()->name) == 0) > { > gfc_current_block ()->declared_at = gfc_current_locus; > gfc_commit_symbols (); > } > else > gfc_error_check (); > > instead?
OK, I've found the code location in parse.c. Yes, I think the above is probably correct. Note, I'm no longer a gfortran maintainer, so I can't approve the patch and I haven't tested it. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37319