summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/testsuite/gcc.dg/ipa/ipa-structreorg-54-csmith-3.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/ipa/ipa-structreorg-54-csmith-3.c b/gcc/testsuite/gcc.dg/ipa/ipa-structreorg-54-csmith-3.c
new file mode 100644
index 00000000000..f49627eeeba
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/ipa/ipa-structreorg-54-csmith-3.c
@@ -0,0 +1,21 @@
+/* { dg-do run } */
+/* { dg-options "-w -flto -flto-partition=none -fipa-dead-field-eliminate" } */
+
+#include <stdint.h>
+//TODO: So, our analysis says that we are deleting a field "a".
+//And that the field "a" is contained in struct "b".
+//However, we are doing is_interesting_struct("c") == yes
+//is_interesting_field("a") == yes
+//and so we delete field a from struct c.
+struct {
+ uint64_t a
+} b[];
+struct {
+ unsigned : 5;
+ unsigned a
+} c;
+d() {
+ uint16_t e = b;
+ int8_t f = c.a;
+}
+main() {}