[Bug tree-optimization/22493] New: [4.1 Regression] with -fwrapv -INT_MIN is still not postive
pinskia at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Thu Jul 14 18:48:00 GMT 2005
Take the following code:
#include <limits.h>
void abort ();
void f(int i)
{
if (i>0)
abort();
i = -i;
if (i<0)
return;
abort ();
}
int main(void)
{
f(INT_MIN);
return 0;
}
This should not abort but does at -O2 -fwrapv and above because VRP is folding the conditional which
is not true as -INT_MIN = INT_MIN still. This causes us to mis compile Long.toString in libjava.
--
Summary: [4.1 Regression] with -fwrapv -INT_MIN is still not
postive
Product: gcc
Version: 4.1.0
Status: UNCONFIRMED
Keywords: wrong-code
Severity: normal
Priority: P2
Component: tree-optimization
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: pinskia at gcc dot gnu dot org
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22493
More information about the Gcc-bugs
mailing list