https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82500
Bug ID: 82500 Summary: [8 Regression] UBSAN in gcc/profile-count.h:190:14: runtime error: signed integer overflow: 1073741823 * 10000 cannot be represented in type 'int' Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: marxin at gcc dot gnu.org CC: hubicka at ucw dot cz Target Milestone: --- 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.