[Bug tree-optimization/46130] [4.6 Regression] ICE: SIGSEGV in walk_stmt_load_store_addr_ops (gimple.c:4894) with -O2 -fno-tree-dce

jakub at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Wed Jan 19 17:31:00 GMT 2011


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

--- Comment #8 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-01-19 16:59:59 UTC ---
Yet another testcase:
extern int bar (int);

static int foo (int x)
{
  int z, w;
  if (x <= 1024)
    {
      z = 16;
      w = 17;
    }
  else
    {
      bar (bar (bar (bar (bar (bar (bar (bar (bar (16)))))))));
      if (x > 131072)
    w = 19;
      else
    w = 21;
      z = 32;
    }
  w = w + 121;
  return z;
}

int
baz (int x)
{
  return foo (x + 6) + foo (x + 15) + foo (x + 24);
}

This one shows one PHI node for retval we handle correctly and one we don't.
What we perhaps could handle is if the phi argument in the other PHI is the
same in all the edges from split_bbs and originates outside of the split bbs,
but probably it isn't worth handling it.



More information about the Gcc-bugs mailing list