summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/tree-ssa/loop-34.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.dg/tree-ssa/loop-34.c')
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/loop-34.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/loop-34.c b/gcc/testsuite/gcc.dg/tree-ssa/loop-34.c
new file mode 100644
index 000000000..5da804f8b
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/loop-34.c
@@ -0,0 +1,21 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-lim-details" } */
+
+int r[6];
+
+void f (int n)
+{
+ while (-- n)
+ {
+ r [0] += r [5];
+ r [1] += r [0];
+ r [2] += r [1];
+ r [3] += r [2];
+ r [4] += r [3];
+ r [5] += r [4];
+ }
+}
+
+
+/* { dg-final { scan-tree-dump-times "Executing store motion of r" 6 "lim1" } } */
+/* { dg-final { cleanup-tree-dump "lim\[1-2\]" } } */