gcc/testsuite/gcc.dg/tree-ssa/pta-callused.c
raw| 1 | /* { dg-do compile } */ |
| 2 | /* { dg-options "-O2 --param max-fields-for-field-sensitive=2 -fdump-tree-alias-details" } */ |
| 3 | |
| 4 | struct Foo { |
| 5 | int *p, *q; |
| 6 | }; |
| 7 | |
| 8 | int *foo (int ***x) __attribute__((pure)); |
| 9 | |
| 10 | int bar (int b) |
| 11 | { |
| 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); |
| 23 | } |
| 24 | |
| 25 | /* { dg-final { scan-tree-dump "CALLUSED\\(\[0-9\]+\\) = { ESCAPED NONLOCAL f.* i q }" "alias" } } */ |
| 26 |