gcc/testsuite/gcc.dg/ipa/ipa-pta-6.c
raw| 1 | /* { dg-do run } */ |
| 2 | /* { dg-options "-O -fipa-pta -fdump-ipa-pta2-details" } */ |
| 3 | |
| 4 | static void __attribute__((noinline,noclone)) |
| 5 | foo (int *p) |
| 6 | { |
| 7 | *p = 1; |
| 8 | } |
| 9 | |
| 10 | extern void abort (void); |
| 11 | |
| 12 | int main() |
| 13 | { |
| 14 | int i = 0; |
| 15 | foo (&i); |
| 16 | if (i != 1) |
| 17 | abort (); |
| 18 | return 0; |
| 19 | } |
| 20 | |
| 21 | /* Verify we correctly compute the units ESCAPED set as empty but |
| 22 | still properly account for the store via *p in foo. */ |
| 23 | |
| 24 | /* { dg-final { scan-ipa-dump "ESCAPED = { }" "pta2" } } */ |