diff options
Diffstat (limited to 'gcc/testsuite/gcc.dg/ipa/ipa-structreorg-18-field-writes-deref-0.c')
-rw-r--r-- | gcc/testsuite/gcc.dg/ipa/ipa-structreorg-18-field-writes-deref-0.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/gcc/testsuite/gcc.dg/ipa/ipa-structreorg-18-field-writes-deref-0.c b/gcc/testsuite/gcc.dg/ipa/ipa-structreorg-18-field-writes-deref-0.c index bc204f4017f..f395f721ba8 100644 --- a/gcc/testsuite/gcc.dg/ipa/ipa-structreorg-18-field-writes-deref-0.c +++ b/gcc/testsuite/gcc.dg/ipa/ipa-structreorg-18-field-writes-deref-0.c @@ -1,12 +1,13 @@ /* { dg-do run } */ -/* { dg-options "-flto -flto-partition=none -fipa-dead-field-eliminate -fdump-ipa-structure-reorg -fipa-typelist-field=b -fipa-typelist-struct=astruct_s" } */ +/* { dg-options "-flto -fipa-type-escape-analysis -fdump-ipa-type-escape-analysis" } */ + +#include <assert.h> int main () { struct astruct_s { - _Bool e; _Bool a; _Bool b; _Bool c; @@ -14,9 +15,12 @@ main () }; struct astruct_s astruct; _Bool *c_ptr = &astruct.c; - c_ptr--; *c_ptr = 1; - _Bool *e_ptr = &astruct.e; - e_ptr++; - return *e_ptr - 1; + _Bool *a_ptr = &astruct.a; + _Bool *d_ptr = &astruct.d; + a_ptr++; + d_ptr--; + assert(*a_ptr == 1); + assert(*d_ptr == 1); + return 0; } |