summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/ipa/ipa-structreorg-23-array-cast-0.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.dg/ipa/ipa-structreorg-23-array-cast-0.c')
-rw-r--r--gcc/testsuite/gcc.dg/ipa/ipa-structreorg-23-array-cast-0.c23
1 files changed, 13 insertions, 10 deletions
diff --git a/gcc/testsuite/gcc.dg/ipa/ipa-structreorg-23-array-cast-0.c b/gcc/testsuite/gcc.dg/ipa/ipa-structreorg-23-array-cast-0.c
index c86bce1f885..a4b1c516fb1 100644
--- a/gcc/testsuite/gcc.dg/ipa/ipa-structreorg-23-array-cast-0.c
+++ b/gcc/testsuite/gcc.dg/ipa/ipa-structreorg-23-array-cast-0.c
@@ -1,9 +1,10 @@
/* { 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>
#include <stdio.h>
#include <stddef.h>
+#include <stdio.h>
int
main ()
@@ -15,14 +16,16 @@ main ()
_Bool c;
};
struct astruct_s a[2];
- struct bstruct_s
- {
- _Bool a;
- _Bool c;
- };
struct astruct_s *a_0 = &(a[0]);
- struct astruct_s *a_1 = a_0 + 1;
- struct bstruct_s *b_0 = (struct bstruct_s *) a_0;
- struct bstruct_s *b_1 = b_0 + 1;
- assert ((struct bstruct_s *) a_1 == b_1);
+ struct astruct_s *a_1 = &(a[1]);
+ struct astruct_s *a_1_from_a_0 = a_0 + 1;
+ printf("%d %d\n", a_0->a, a_0->c);
+ // old new
+ // 0 a a
+ // 1 b c
+ // 2 c a
+ // 3 a c
+ // 4 b a
+ // 5 c c
+ assert(a_1 == a_1_from_a_0);
}