[Bug tree-optimization/79958] Missed tree DSE

rguenth at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Fri Mar 10 09:14:00 GMT 2017


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

--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
Small C testcase:

struct X { int i; };
void bar ();
void foo (int b)
{
  struct X x;
  x.i = 1;
  if (b)
    {
      bar ();
      __builtin_abort ();
    }
  bar ();
}


You need to provide -fno-tree-dce as DCE is able to catch these cases
(in your case only one-by-one as for addressable vars it uses stupid
analysis).


More information about the Gcc-bugs mailing list