[Bug tree-optimization/61383] [4.8/4.9/4.10 Regression] wrong code at -O2 and -O3 on x86_64-linux-gnu
rguenth at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon Jun 2 14:02:00 GMT 2014
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61383
--- Comment #5 from Richard Biener <rguenth at gcc dot gnu.org> ---
(In reply to Marc Glisse from comment #3)
> This very minor variant also misbehaves with 4.7 and 4.6, so before my
> patch. An unsafe instruction (1%f) is taken out of a branch in ifcombine.
>
> int a, b = 1, c, d, e, f, g;
>
> int
> fn1 ()
> {
> int h;
> for (;;)
> {
> g = b;
> g = g ? 0 : 1 % g;
> e = a + 1;
> for (; d < 1; d = e)
> {
> if (f == 0)
> h = 0;
> else
> h = 1 % f;
> if (f < 1)
> c = 0;
> else if (h)
> break;
> }
> if (b)
> return 0;
> }
> }
>
> int
> main ()
> {
> fn1 ();
> return 0;
> }
I have a patch in testing. (and fixed the tree PRE issue in the past...)
More information about the Gcc-bugs
mailing list