diff options
Diffstat (limited to 'gcc/testsuite/gcc.dg/ipa/ipa-structreorg-06-field-writes-0.c')
-rw-r--r-- | gcc/testsuite/gcc.dg/ipa/ipa-structreorg-06-field-writes-0.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/ipa/ipa-structreorg-06-field-writes-0.c b/gcc/testsuite/gcc.dg/ipa/ipa-structreorg-06-field-writes-0.c new file mode 100644 index 00000000000..6f064c6902b --- /dev/null +++ b/gcc/testsuite/gcc.dg/ipa/ipa-structreorg-06-field-writes-0.c @@ -0,0 +1,24 @@ +/* { dg-do run } */ +/* { dg-options "-flto -fipa-type-escape-analysis -fdump-ipa-type-escape-analysis " } */ + +#include <stdio.h> + +int +main () +{ + struct astruct_s + { + _Bool a; + _Bool b; + _Bool c; + }; + struct astruct_s astruct; + astruct.c = 0; + printf ("%d %d\n", astruct.a, astruct.c); + return 0; +} + +/* { dg-final { scan-ipa-dump "replacing field a 0 with a 0" "type-escape-analysis" } } */ +// There's two... mmm.. not sure how to convey this here to the test? +/* { dg-final { scan-ipa-dump "replacing field c 16 with c 8" "type-escape-analysis" } } */ +/* { dg-final { scan-ipa-dump "replacing field c 16 with c 8" "type-escape-analysis" } } */ |