Having bootstrap-ubsan, one can see: $ cat /tmp/ubsan.i int d(); int e(); __attribute__((__cold__)) int a(); int b() { a(); } int c() { b(); if (d()) e(); } $ gcc -O2 /tmp/ubsan.i -c ../../gcc/profile-count.h:190:14: runtime error: signed integer overflow: 1073741823 * 10000 cannot be represented in type 'int' ../../gcc/profile-count.h:190:14: runtime error: signed integer overflow: 1073741823 * 10000 cannot be represented in type 'int' I'll fix it.
Dup. *** This bug has been marked as a duplicate of bug 81318 ***