diff options
author | Erick Ochoa <erick.ochoa@theobroma-systems.com> | 2020-06-18 17:20:37 +0200 |
---|---|---|
committer | Erick Ochoa <erick.ochoa@theobroma-systems.com> | 2020-06-18 19:21:41 +0200 |
commit | c82c07726da2ed895875090bc8be91fc0704b733 (patch) | |
tree | 443c7480cf7ecef59a1fe798056d497913ff92b4 /gcc/testsuite/gcc.dg/ipa/ipa-structreorg-49-array-0.c | |
parent | 06e71a7c2b914b3dba71c3c1032d58abb3f52046 (diff) |
deleting writes to field
Diffstat (limited to 'gcc/testsuite/gcc.dg/ipa/ipa-structreorg-49-array-0.c')
-rw-r--r-- | gcc/testsuite/gcc.dg/ipa/ipa-structreorg-49-array-0.c | 48 |
1 files changed, 0 insertions, 48 deletions
diff --git a/gcc/testsuite/gcc.dg/ipa/ipa-structreorg-49-array-0.c b/gcc/testsuite/gcc.dg/ipa/ipa-structreorg-49-array-0.c deleted file mode 100644 index 6f4fb557d16..00000000000 --- a/gcc/testsuite/gcc.dg/ipa/ipa-structreorg-49-array-0.c +++ /dev/null @@ -1,48 +0,0 @@ -/* { dg-do run } */ -/* { dg-options "-flto -flto-partition=none -fipa-dead-field-eliminate -fdump-ipa-structure-reorg -fipa-typelist-field=nextout,nextin -fipa-typelist-struct=astruct_s " } */ - -#include <assert.h> -#include <stddef.h> - -int -main (int argc, char **argv) -{ - struct astruct_s - { - int id; - long cost; - void *tail; - void *head; - void *nextin; - void *nextout; - short ident; - long flow; - long org_cost; - }; - struct cstruct_s - { - int id; - long cost; - void *tail; - void *head; - short ident; - long flow; - long org_cost; - }; - struct bstruct_s - { - struct astruct_s *basic_arc; - }; - long num = argc; - struct astruct_s array[100]; - struct astruct_s *old_arcs = array; - struct bstruct_s b; - struct bstruct_s *c = &b; - c->basic_arc = array + num; - c->basic_arc->cost = num; - struct cstruct_s *other = ((struct cstruct_s *) (array)) + num; - size_t off = c->basic_arc - old_arcs; - size_t off2 = other - (struct cstruct_s *) old_arcs; - assert ((struct cstruct_s *) c->basic_arc == other); - assert (c->basic_arc->cost == other->cost); -} |