aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/c-c++-common/restrict-4.c
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2009-11-01 21:46:35 -0500
committerJason Merrill <jason@gcc.gnu.org>2009-11-01 21:46:35 -0500
commit3f252b91b1e4fd540f0e9e40a4ead814a011ec6e (patch)
treec4b8ce04d69175e1bbc5efa935131c2ad9237261 /gcc/testsuite/c-c++-common/restrict-4.c
parentd11e83e1f4d319aca64077ef53ce2d211686be03 (diff)
downloadgcc-3f252b91b1e4fd540f0e9e40a4ead814a011ec6e.zip
gcc-3f252b91b1e4fd540f0e9e40a4ead814a011ec6e.tar.gz
gcc-3f252b91b1e4fd540f0e9e40a4ead814a011ec6e.tar.bz2
restrict-1.c: Move to c-c++-common.
* gcc.dg/tree-ssa/restrict-1.c: Move to c-c++-common. * gcc.dg/tree-ssa/restrict-2.c: Move to c-c++-common. * gcc.dg/tree-ssa/restrict-4.c: Move to c-c++-common. From-SVN: r153800
Diffstat (limited to 'gcc/testsuite/c-c++-common/restrict-4.c')
-rw-r--r--gcc/testsuite/c-c++-common/restrict-4.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/gcc/testsuite/c-c++-common/restrict-4.c b/gcc/testsuite/c-c++-common/restrict-4.c
new file mode 100644
index 0000000..3a36def
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/restrict-4.c
@@ -0,0 +1,19 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-lim1-details" } */
+
+struct Foo
+{
+ int n;
+ int * __restrict__ p;
+};
+void bar(struct Foo f, int * __restrict__ q)
+{
+ int i;
+ for (i = 0; i < f.n; ++i)
+ {
+ *q += f.p[i];
+ }
+}
+
+/* { dg-final { scan-tree-dump "Executing store motion" "lim1" } } */
+/* { dg-final { cleanup-tree-dump "lim1" } } */