This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/70586] [4.9/5/6 Regression] wrong code at -O2 and -O3 on x86_64-linux-gnu in 32-bit and 64-bit modes
- From: "jakub at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 07 Apr 2016 20:33:23 +0000
- Subject: [Bug tree-optimization/70586] [4.9/5/6 Regression] wrong code at -O2 and -O3 on x86_64-linux-gnu in 32-bit and 64-bit modes
- Auto-submitted: auto-generated
- References: <bug-70586-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70586
--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
int a, e, f;
short b, c, d;
int
foo (int x, int y)
{
return (y == 0 || (x && y == 1)) ? x : x % y;
}
static short
bar (void)
{
int i = foo (c, f);
f = foo (d, 2);
int g = foo (b, c);
int h = foo (g > 0, c);
c = (3 >= h ^ 7) <= foo (i, c);
if (foo (e, 1))
return a;
return 0;
}
int
main ()
{
bar ();
return 0;
}
I think this goes wrong during ifcombine, will have a look tomorrow.