Merge from trunk @ 138209
[official-gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / pta-callused.c
blobc2b512a12e96bcd928474ac2ed8a3e9a84e22027
1 /* { dg-do compile } */
2 /* { dg-options "-O2 --param max-fields-for-field-sensitive=2 -fdump-tree-alias" } */
4 struct Foo {
5 int *p, *q;
6 };
8 int foo (int ***x) __attribute__((pure));
10 int bar (int b)
12 int i;
13 struct Foo f;
14 int *p, **q;
15 p = &i;
16 f.p = &i;
17 f.q = f.p;
18 if (b)
19 q = &f.p;
20 else
21 q = &f.q;
22 return foo (&q);
25 /* { dg-final { scan-tree-dump "CALLUSED = { f.* i q }" "alias" } } */
26 /* { dg-final { cleanup-tree-dump "alias" } } */