diff options
author | Erick Ochoa <erick.ochoa@theobroma-systems.com> | 2020-04-29 12:27:58 +0200 |
---|---|---|
committer | Erick Ochoa <erick.ochoa@theobroma-systems.com> | 2020-06-03 16:05:25 +0200 |
commit | 077a2e9bcb547d9939ad126c196440c42f72433c (patch) | |
tree | 92e96dd51837a126338e3f9f820faea58ef1aef3 /gcc/testsuite | |
parent | 9624e57c62751eaf8cffe908c7fa1ab6720b62a1 (diff) |
Adds csmith test #5
Diffstat (limited to 'gcc/testsuite')
-rw-r--r-- | gcc/testsuite/gcc.dg/ipa/ipa-structreorg-56-csmith-5.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/ipa/ipa-structreorg-56-csmith-5.c b/gcc/testsuite/gcc.dg/ipa/ipa-structreorg-56-csmith-5.c new file mode 100644 index 00000000000..27da3daa29d --- /dev/null +++ b/gcc/testsuite/gcc.dg/ipa/ipa-structreorg-56-csmith-5.c @@ -0,0 +1,19 @@ +/* { dg-do run } */ +/* { dg-options "-w -flto -flto-partition=none -fipa-dead-field-eliminate" } */ + +#include <stdint.h> +struct a { + int8_t b +}; +struct c { + struct a d +} e[]; + +/* Analysis failed because e[2].d was considered not read + * we were only looking at e[2].d.b which is considered read. + * So we need to recurse + */ +f() { g(e[2].d.b, 0); } + +void g(int8_t a, int8_t b) { a + b ;} +main() {} |