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]
Other format: [Raw text]

[Bug tree-optimization/83323] [8 Regression] 186.crafty miscompares


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83323

--- Comment #5 from Richard Biener <rguenth at gcc dot gnu.org> ---
Fails with -O2 -funroll-and-jam --param unroll-jam-min-percent=0

int x[1024], y[1024];

void __attribute__((noipa)) foo ()
{
  for (int i = 0; i < 1024; ++i)
    {
      x[i] = 0;
      for (int j = 0; j < 1024; ++j)
        if (!y[j])
          x[i] = 1;
    }
}

int main()
{
  y[1023] = 1;
  foo ();
  if (x[1] != 1)
    __builtin_abort ();
  return 0;
}

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