http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55883
Bug #: 55883 Summary: with -fwrapv, (x < 0 && -x < 0) is assumed to be false Classification: Unclassified Product: gcc Version: 4.7.2 Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization AssignedTo: unassig...@gcc.gnu.org ReportedBy: xi.w...@gmail.com This is slightly different from Bug 22493. #include <limits.h> void abort (); void f(int i) { if (i<0 && -i<0) return; abort (); } int main(void) { f(INT_MIN); return 0; } The program should not abort if compiled with -fwrapv. 4.7.2 and 4.6.3 seem to miscompile it. 4.8 is good.