summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/torture/pr39132.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.dg/torture/pr39132.c')
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr39132.c34
1 files changed, 34 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/torture/pr39132.c b/gcc/testsuite/gcc.dg/torture/pr39132.c
new file mode 100644
index 000000000..f6e2907e0
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr39132.c
@@ -0,0 +1,34 @@
+/* { dg-do run } */
+/* { dg-options "-ftree-loop-distribution" } */
+
+extern void abort(void);
+
+struct epic_private
+{
+ unsigned int *rx_ring;
+ unsigned int rx_skbuff[5];
+};
+
+int
+main (void)
+{
+ struct epic_private ep;
+ unsigned int rx_ring[5];
+ int i;
+
+ ep.rx_skbuff[0] = 5;
+
+ ep.rx_ring = rx_ring;
+
+ for (i = 0; i < 5; i++)
+ {
+ ep.rx_ring[i] = i;
+ ep.rx_skbuff[i] = 0;
+ }
+
+ if (ep.rx_skbuff[0] != 0)
+ abort ();
+
+ return 0;
+}
+