This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/22018] New: [4.1 Regression] VRP miscompiles multiply
- 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: 11 Jun 2005 16:11:23 -0000
- Subject: [Bug tree-optimization/22018] New: [4.1 Regression] VRP miscompiles multiply
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
The following should not abort at any optimization level but does at -O2:
void abort (void);
void g(int);
void f(int l)
{
unsigned i;
for (i = 0; i < l; i++)
{
int y = i;
int z = y*-32;
g(z);
}
}
void g(int i)
{
static int x = 0;
if (i == 0)
x ++;
if (x > 1)
abort ();
}
int main(void)
{
f(3);
return 0;
}
This is reduced from the message at:
<http://gcc.gnu.org/ml/gcc-patches/2005-06/msg00458.html>.
--
Summary: [4.1 Regression] VRP miscompiles multiply
Product: gcc
Version: 4.1.0
Status: UNCONFIRMED
Keywords: wrong-code, build
Severity: critical
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=22018