diff options
Diffstat (limited to 'gcc/testsuite/gcc.dg/ipa/ipa-pta-6.c')
-rw-r--r-- | gcc/testsuite/gcc.dg/ipa/ipa-pta-6.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/ipa/ipa-pta-6.c b/gcc/testsuite/gcc.dg/ipa/ipa-pta-6.c new file mode 100644 index 000000000..aaa6090dd --- /dev/null +++ b/gcc/testsuite/gcc.dg/ipa/ipa-pta-6.c @@ -0,0 +1,25 @@ +/* { dg-do run } */ +/* { dg-options "-O -fipa-pta -fdump-ipa-pta-details" } */ + +static void __attribute__((noinline,noclone)) +foo (int *p) +{ + *p = 1; +} + +extern void abort (void); + +int main() +{ + int i = 0; + foo (&i); + if (i != 1) + abort (); + return 0; +} + +/* Verify we correctly compute the units ESCAPED set as empty but + still properly account for the store via *p in foo. */ + +/* { dg-final { scan-ipa-dump "ESCAPED = { }" "pta" } } */ +/* { dg-final { cleanup-ipa-dump "pta" } } */ |