https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64978
--- Comment #9 from Jan Hubicka <hubicka at gcc dot gnu.org> --- OK, I think I found the bug - when doing the dataflow, we need to push the actual function not alias visited. Index: ipa-cp.c =================================================================== --- ipa-cp.c (revision 220547) +++ ipa-cp.c (working copy) @@ -561,8 +561,7 @@ gather_caller_stats (struct cgraph_node for (cs = node->callers; cs; cs = cs->next_caller) if (cs->caller->thunk.thunk_p) - cs->caller->call_for_symbol_thunks_and_aliases (gather_caller_stats, - stats, false); + ; else { stats->count_sum += cs->count; @@ -2643,7 +2642,7 @@ propagate_constants_topo (struct ipa_top for (cs = v->callees; cs; cs = cs->next_callee) if (ipa_edge_within_scc (cs) && propagate_constants_accross_call (cs)) - push_node_to_stack (topo, cs->callee); + push_node_to_stack (topo, cs->callee->function_symbol ()); v = pop_node_from_stack (topo); }