http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58682
--- Comment #2 from Paulo J. Matos <pa...@matos-sorge.com> --- Here's my reading of the problem: core_bench_list calls core_list_mergesort which indirectly (through a function pointer) calls cmp_idx. The global max_count variable is updated in the beginning of inline_small_functions, but later we inline core_list_mergesort into core_bench_list which adds cmp_idx to the list of callees of core_list_mergesort generating this cgraph_node: core_list_mergesort/32 (core_list_mergesort) @0x2b97efed8378 Type: function Visibility: public References: Referring: Function core_list_mergesort/32 is inline copy in core_bench_list/4 Clone of core_list_mergesort/11 Availability: local Function flags: analyzed executed 2x body local finalized Called by: core_bench_list/4 (2x) (1.00 per call) (inlined) Calls: cmp_idx/2 (indirect_inlining) (217x) (100.00 per call) Now there is an edge (core_list_mergesort -> cmp_idx) whose count is higher (217) than the max_count global variable. This causes an ICE in edge_badness which has the assertion (max_count >= edge_count).