This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/82500] New: [8 Regression] UBSAN in gcc/profile-count.h:190:14: runtime error: signed integer overflow: 1073741823 * 10000 cannot be represented in type 'int'
- From: "marxin at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 10 Oct 2017 07:52:36 +0000
- Subject: [Bug tree-optimization/82500] New: [8 Regression] UBSAN in gcc/profile-count.h:190:14: runtime error: signed integer overflow: 1073741823 * 10000 cannot be represented in type 'int'
- Auto-submitted: auto-generated
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.