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

--- Comment #2 from Feng Xue <fxue at os dot amperecomputing.com> ---
int fn();

int goo(const int *p)
{
  return fn();
}

int data;

int foo (const int *p)
{
  int i;
  int t;

  data = *p;                     

  for (i = 0; i < 100; i++)
    {
      int t = *p + 1;

      goo (&t);
    }

  return *p;
}

Compile the above with -O3 -fno-early-inlining -fno-inline
-fno-partial-inlining, and add a breakpoint at stmt_may_clobber_ref_p_1(), you
will find the call stmt_may_clobber_ref_p_1 (stmt/* data = *p; */, *p) returns
true.

Reply via email to