+++ This bug was initially created as a clone of Bug #38934 +++ This failure is not "worked around" by FRE unlike 38932.
/* { dg-do compile } */ /* { dg-options "-O2 --std=gnu99" } */ /* This variable needed only to work around earlier optimizations than VRP. */ unsigned char g; extern void abort(); void f (long long int p) { g = 255; /* { dg-warning "constant is" "" { target *-*-* } 14 } */ /* { dg-warning "overflow" "" { target *-*-* } 14 } */ if (p >= -9223372036854775808LL - (signed char) g) p = 1; if (p) abort (); } 3.2.x issued just one warning both in 32-bit HWI i386 gcc and x86_64 -m32 gcc, haven't checked 3.3, 3.4 and later issues one extra warning in 32-bit HWI compilation. -- Summary: [4.2/4.3/4.4 Regression] Extra overflow warning in 32- bit HWI compiler Product: gcc Version: 4.4.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: middle-end AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: jakub at gcc dot gnu dot org GCC target triplet: i686-pc-linux-gnu BugsThisDependsOn: 38934 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38999