aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/tree-ssa/restrict-3.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.dg/tree-ssa/restrict-3.c')
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/restrict-3.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/restrict-3.c b/gcc/testsuite/gcc.dg/tree-ssa/restrict-3.c
new file mode 100644
index 0000000..08faafa
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/restrict-3.c
@@ -0,0 +1,18 @@
+/* { dg-do compile } */
+/* { dg-options "-O -fno-strict-aliasing -fdump-tree-lim-details" } */
+
+void f(int * __restrict__ r,
+ int a[__restrict__ 16][16],
+ int b[__restrict__ 16][16],
+ int i, int j)
+{
+ int x;
+ *r = 0;
+ for (x = 1; x < 16; ++x)
+ *r = *r + a[i][x] * b[x][j];
+}
+
+/* We should apply store motion to the store to *r. */
+
+/* { dg-final { scan-tree-dump "Executing store motion of \\\*r" "lim" } } */
+/* { dg-final { cleanup-tree-dump "lim" } } */