This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/83323] [8 Regression] 186.crafty miscompares
- From: "rguenth at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 08 Dec 2017 13:40:09 +0000
- Subject: [Bug tree-optimization/83323] [8 Regression] 186.crafty miscompares
- Auto-submitted: auto-generated
- References: <bug-83323-4@http.gcc.gnu.org/bugzilla/>
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;
}