Adjust scan string for PIE
[official-gcc.git] / gcc / testsuite / gcc.dg / ipa / ipa-pta-15.c
blob77701ebd5ad641e6e646f29c280890b4e08d2fdb
1 /* { dg-do run } */
2 /* { dg-options "-O2 -fipa-pta" } */
4 struct Foo {
5 int *p;
6 int *q;
7 };
9 void __attribute__((noinline))
10 bar (int **x)
12 struct Foo *f = (struct Foo *)(x - 1);
13 *(f->p) = 0;
16 int foo(void)
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;
26 extern void abort (void);
27 int main()
29 if (foo () != 0)
30 abort ();
31 return 0;