This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
strength-reduce bug in gcc-ss-20000814 (and earlier)
- To: gcc-bugs at gcc dot gnu dot org
- Subject: strength-reduce bug in gcc-ss-20000814 (and earlier)
- From: "Thomas R. Truscott" <trt at cs dot duke dot edu>
- Date: Mon, 14 Aug 2000 22:18:36 -0400 (EDT)
This program calls abort when compiled -O2 or "-O -fstrength-reduce"
with 200000824, and several earlier versions, for i686-pc-linux.
(I've no clue why.) This was distilled from a much larger chunk of code.
Tom Truscott
============
int x[] = { 0, 1 };
int
main ()
{
int i, f;
f = -1;
for (i = 0; i < 2 && f < 0; i++)
{
if (x[i] != 0)
f = i;
}
if (f < 0)
abort ();
return 0;
}