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-05-14 14:45:55 +0200
commit5046b66cf62fa4b24170eea36eb2a2de13e99b7a (patch)
tree43e7aae5d0bf094fed2098074e8c400025484aeb
parent9646025b05dce869b60d2dabcc0a664b80aa629e (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() {}