diff options
author | Erick Ochoa <erick.ochoa@theobroma-systems.com> | 2020-04-29 16:53:34 +0200 |
---|---|---|
committer | Erick Ochoa <erick.ochoa@theobroma-systems.com> | 2020-06-03 16:05:27 +0200 |
commit | 443f3dc79ee00ee36f51f0229fe373d5ffed7376 (patch) | |
tree | 0c86725b9b8956c22967b2db77816f7377bf9298 /gcc/testsuite | |
parent | 7b9105bcd06783a1e13fe5e56ea5f5df57dc507b (diff) |
Add const test
Diffstat (limited to 'gcc/testsuite')
-rw-r--r-- | gcc/testsuite/gcc.dg/ipa/ipa-structreorg-60-csmith-9.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/ipa/ipa-structreorg-60-csmith-9.c b/gcc/testsuite/gcc.dg/ipa/ipa-structreorg-60-csmith-9.c new file mode 100644 index 00000000000..b1001a6286c --- /dev/null +++ b/gcc/testsuite/gcc.dg/ipa/ipa-structreorg-60-csmith-9.c @@ -0,0 +1,20 @@ +/* { dg-do run } */ +/* { dg-options "-w -flto -flto-partition=none -fipa-dead-field-eliminate" } */ + +#include <stdint.h> + +void foo(uint64_t a, uint64_t b) +{ a + b; } + +struct a { + uint64_t b; + uint8_t c +} d() { + // I think the problem here is with the const attribute... + const struct a e; + foo(0, e.b); + return e; +} + + +main() {} |