http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60636
Bug ID: 60636 Summary: ubsan doesn't instrument signed integer ABS_EXPR Product: gcc Version: 4.9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: sanitizer Assignee: unassigned at gcc dot gnu.org Reporter: mpolacek at gcc dot gnu.org CC: dodji at gcc dot gnu.org, dvyukov at gcc dot gnu.org, jakub at gcc dot gnu.org, kcc at gcc dot gnu.org We should detect the negation of LONG_MIN on the following: #include <limits.h> int main () { long int u = LONG_MIN; long int a = u > 0 ? u : -u; return 0; }