http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48692
Tobias Burnus <burnus at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|--- |4.7.0 --- Comment #2 from Tobias Burnus <burnus at gcc dot gnu.org> 2011-04-19 21:54:03 UTC --- The symbol which is still referenced in "changed_syms" is the attr.generic FL_PROCEDURE "len", which is the only symbol (->tlink == NULL). In principle, the symbols should be committed via gfc_parse_file's: case ST_MODULE: push_state (&s, COMP_MODULE, gfc_new_block); accept_statement (st); /* This commits the pending symbols. */ [...] parse_module (); /* Ditto, calls accept_statement. */ That also nicely works - the symbol only pops up suddenly when calling gfc_dump_module, which seems to be a bug in gfc_dump_module. The reason that the issue was not seen before is that "gfc_generate_module_code" calls calling gfc_generate_module_vars, which calls gfc_trans_common which calls gfc_commit_symbols (). Thus, a patch which papers the issue would add a call to "gfc_commit_symbols ();". However, the proper solutions to find out why gfc_dump_module leaves a dangling symbol.