https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85608
Bug ID: 85608 Summary: ubsan in cse.c:2194 Product: gcc Version: 8.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: dcb314 at hotmail dot com Target Milestone: --- From the gcc testsuite, the file gcc.dg/pr82596.c, when compiled by a recent ubsan version of trunk gcc, does this: $ ~/gcc/results.259742.ubsan/bin/gcc -c -O2 -w ./gcc.dg/pr82596.c ../../trunk/gcc/cse.c:2194:34: runtime error: signed integer overflow: 1 - -9223372036854775807 cannot be represented in type 'long int' $ case.c:2194 is this line: 360 kenner offset = (get_integer_term (x) - get_integer_term (p->exp)); I'll have my usual go at finding a range of revisions and a short test case.