[Bug tree-optimization/100112] missed optimization for dead code elimination at -O3, -Os (vs. -O1, -O2)

rguenth at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Mon Sep 27 07:31:26 GMT 2021


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

--- Comment #9 from Richard Biener <rguenth at gcc dot gnu.org> ---
So the point is that

int *c, *b;
void foo()
{
  int *tem = b;
  *tem = 0;
  int *tem2 = c;
  c = tem2;
}

and

int *c, *b;
void foo()
{
  int *tem = b;
  int *tem2 = c;
  *tem = 0;
  c = tem2;
}

are different but we encode tem2 = c; the same in the hashtable with
strict-aliasing.


More information about the Gcc-bugs mailing list