This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

strength-reduce bug in gcc-ss-20000814 (and earlier)


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;
}

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]