summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/ipa/ipa-structreorg-60-csmith-9.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.dg/ipa/ipa-structreorg-60-csmith-9.c')
-rw-r--r--gcc/testsuite/gcc.dg/ipa/ipa-structreorg-60-csmith-9.c26
1 files changed, 26 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..0a99e271628
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/ipa/ipa-structreorg-60-csmith-9.c
@@ -0,0 +1,26 @@
+/* { dg-do run } */
+/* { dg-options "-w -flto -fipa-type-escape-analysis -fdump-ipa-type-escape-analysis " } */
+
+#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 () {}
+
+/// { dg-final { scan-ipa-dump "a.c may be deleted" "type-escape-analysis" } } */