1 /* { dg-do run } */ 2 /* { dg-options "-O2 -fipa-pta" } */ 3 4 struct Foo { 5 int *p; 6 int *q; 7 }; 8 9 void __attribute__((noinline)) bar(int ** x)10bar (int **x) 11 { 12 struct Foo *f = (struct Foo *)(x - 1); 13 *(f->p) = 0; 14 } 15 foo(void)16int foo(void) 17 { 18 struct Foo f; 19 int i = 1, j = 2; 20 f.p = &i; 21 f.q = &j; 22 bar(&f.q); 23 return i; 24 } 25 26 extern void abort (void); main()27int main() 28 { 29 if (foo () != 0) 30 abort (); 31 return 0; 32 } 33