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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |alias, wrong-code

--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> ---
wrong-code testcase:

int main(int argc, char **argv)
{
  struct S { int x[argc]; } s;

  void foo (struct S *s)
    {
      struct S * volatile p = s;
      p->x[1] = 0;
    }
  s.x[1] = 1;
  foo (&s);
  if (s.x[1] != 0)
    __builtin_abort ();
  return 0;
}

passes with -O2 -fno-early-inlining and fails with -O2 -fno-early-inlining
-flto
because we do not merge the two S canonically (and we stream them twice,
they are shared w/o LTO).

Reply via email to