[Bug tree-optimization/39074] PTA constraint processing for *x = y is wrong

rguenth at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Wed Feb 4 12:26:00 GMT 2009



------- Comment #10 from rguenth at gcc dot gnu dot org  2009-02-04 12:26 -------
This one fails on trunk (where we fall back to anything for empty points-to
sets, so just add some unrelated &j and the vops are wrong):

int i;
long __attribute__((noinline,const)) bar(int ***p) { return (long)p; }
void __attribute__((noinline))
foo(void)
{
  int j;
  int *y = &j;
  int **a = &y, **x;
  int ***p;
  long b;
  b = bar(&a);
  p = (int ***)b;
  x = *p;
  *x = &i;
  *y = 0;
}
extern void abort (void);
int main()
{
  i = 1;
  foo ();
  if (i != 0)
    abort ();
  return 0;
}


-- 


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



More information about the Gcc-bugs mailing list