https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63432
H.J. Lu <hjl.tools at gmail dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Last reconfirmed| |2014-10-03 Ever confirmed|0 |1 --- Comment #8 from H.J. Lu <hjl.tools at gmail dot com> --- Bug is in static void recompute_probabilities (basic_block bb) { edge esucc; edge_iterator ei; FOR_EACH_EDGE (esucc, ei, bb->succs) { if (bb->count) esucc->probability = GCOV_COMPUTE_SCALE (esucc->count, bb->count); if (esucc->probability > REG_BR_PROB_BASE) { We got (gdb) whatis esucc->probability type = int (gdb) p esucc->count $7 = 2822215 (gdb) p bb->count $8 = 1 (gdb) p esucc->probability $9 = -1842621072 (gdb) When count is set from frequency scaled up by REG_BR_PROB_BASE, probability may overflow.