diff --git a/gcc/ipa-pure-const.c b/gcc/ipa-pure-const.c index 1af3206056e..70930a5eac0 100644 --- a/gcc/ipa-pure-const.c +++ b/gcc/ipa-pure-const.c @@ -1152,6 +1152,9 @@ funct_state_summary_t::insert (cgraph_node *node, funct_state_d *state) new (state) funct_state_d (*a); free (a); } + else + /* Do not keep stale summaries. */ + funct_state_summaries->remove (node); } /* Called when new clone is inserted to callgraph late. */