[Bug tree-optimization/42906] [4.5 Regression] Empty loop not removed

rguenth at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Sat Jan 30 16:58:00 GMT 2010



------- Comment #7 from rguenth at gcc dot gnu dot org  2010-01-30 16:58 -------
Indeed it works for

void bar (void);
int foo (int b, int j)
{
  if (b)
    {
      int i;
      for (i = 0; i<1000; ++i)
        ;
      bar ();
      j = 0;
    }
  return j;
}


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42906



More information about the Gcc-bugs mailing list