diff options
Diffstat (limited to 'gcc/testsuite/gcc.dg/ipa/ipa-structreorg-48-function-ptr-0.c')
-rw-r--r-- | gcc/testsuite/gcc.dg/ipa/ipa-structreorg-48-function-ptr-0.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/gcc/testsuite/gcc.dg/ipa/ipa-structreorg-48-function-ptr-0.c b/gcc/testsuite/gcc.dg/ipa/ipa-structreorg-48-function-ptr-0.c index 2e55ad41d34..8b9f3e67501 100644 --- a/gcc/testsuite/gcc.dg/ipa/ipa-structreorg-48-function-ptr-0.c +++ b/gcc/testsuite/gcc.dg/ipa/ipa-structreorg-48-function-ptr-0.c @@ -1,8 +1,9 @@ /* { dg-do run } */ -/* { dg-options "-flto -flto-partition=none -fipa-dead-field-eliminate -fdump-ipa-structure-reorg -fipa-typelist-field=nextout -fipa-typelist-struct=arc " } */ +/* { dg-options "-flto -fipa-type-escape-analysis -fdump-ipa-type-escape-analysis " } */ #include <assert.h> #include <stddef.h> +#include <stdio.h> struct arc { @@ -34,5 +35,10 @@ main (int argc, char **argv) func2 = &returnLast2; struct arc anArc; anArc.c = argc; - assert (func1 (anArc) == func2 (anArc)); + printf("%d %d", anArc.a, anArc.c); + // These test means that things remain equal + // A.k.a without an optimization. + // Why? Because a function pointer can be a + // pointer to anything + assert (func1 (anArc) != func2 (anArc)); } |