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

--- Comment #10 from Richard Biener <rguenth at gcc dot gnu.org> ---
Created attachment 51847
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=51847&action=edit
patch

Looks like I have to exclude summary->global_memory_read since otherwise a
trivial testcase like the following is miscompiled (the access tree does not
have the access for 'p').

unsigned p;
unsigned __attribute__((noinline)) test (int)
{
  return p;
}
int main()
{
  p = 1;
  if (test (0) != 1)
    __builtin_abort ();
  p = 2;
  if (test (0) != 2)
    __builtin_abort ();
  return 0;
}

Reply via email to