This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/22493] New: [4.1 Regression] with -fwrapv -INT_MIN is still not postive
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 14 Jul 2005 18:48:03 -0000
- Subject: [Bug tree-optimization/22493] New: [4.1 Regression] with -fwrapv -INT_MIN is still not postive
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
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