Test for AltiVec function vec_ld, passing a pointer to const vector.
authorFariborz Jahanian <fjahanian@gcc.gnu.org>
Tue, 11 May 2004 20:29:48 +0000 (20:29 +0000)
committerFariborz Jahanian <fjahanian@gcc.gnu.org>
Tue, 11 May 2004 20:29:48 +0000 (20:29 +0000)
Approved by Aldy Hernandez.

From-SVN: r81716

gcc/testsuite/g++.dg/ext/altivec-9.C [new file with mode: 0644]

diff --git a/gcc/testsuite/g++.dg/ext/altivec-9.C b/gcc/testsuite/g++.dg/ext/altivec-9.C
new file mode 100644 (file)
index 0000000..cb7e4bb
--- /dev/null
@@ -0,0 +1,13 @@
+/* Test for AltiVec function vec_ld, passing a pointer to const vector */
+/* { dg-do compile { target powerpc*-*-* } } */
+/* { dg-options "-maltivec" } */
+
+#include <altivec.h>
+
+typedef vector unsigned char vuc_t;
+const vuc_t* p;
+vector unsigned char test_vec_ld()
+{
+        return vec_ld(0,p);
+}
+