summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErick Ochoa <erick.ochoa@theobroma-systems.com>2020-04-29 16:53:34 +0200
committerErick Ochoa <erick.ochoa@theobroma-systems.com>2020-04-29 16:53:34 +0200
commit7c8b17dffa131dafaabff14572599369cc69db09 (patch)
tree497f755e1ab2ba620ab0ad4d375eb774cc382ce9
parentef42be8fb31d7edc6e4ae159b9ddb84046c58647 (diff)
Add const test
-rw-r--r--gcc/testsuite/gcc.dg/ipa/ipa-structreorg-60-csmith-9.c20
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() {}