PR middle-end/77357 - strlen of constant strings not folded
[official-gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / pta-callused.c
blobb9a57d8d13513c17abfd5c28a4a872589d53d814
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\\(\[0-9\]+\\) = { ESCAPED NONLOCAL f.* i q }" "alias" } } */