https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60898

--- Comment #18 from Mikael Morin <mikael at gcc dot gnu.org> ---
Created attachment 34756
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=34756&action=edit
patch fixing comment #7

(In reply to Mikael Morin from comment #17)
> Using Tobias' analysis in comment #14, there is an "obvious" fix, augmenting
> the reference count of the symbols present in the vector (untested):
> 
This is not enough.
There is some code in resolve_symbol that reassigns some this_symtree->n.sym,
and may call gfc_release_symbol.  The problem being there is no check that
this_symtree->n.sym == sym, so that we may apply gfc_free_symbol to something
that remains reachable through this_symtree->n.sym.

Reply via email to