aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/altivec-16.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.dg/altivec-16.c')
-rw-r--r--gcc/testsuite/gcc.dg/altivec-16.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/altivec-16.c b/gcc/testsuite/gcc.dg/altivec-16.c
new file mode 100644
index 00000000000..0be609431ce
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/altivec-16.c
@@ -0,0 +1,22 @@
+/* This is a compile-only test for interaction of "-maltivec" and "-save-temps". */
+/* Author: Ziemowit Laski <zlaski@apple.com>. */
+/* { dg-do compile { target powerpc*-*-* } } */
+/* { dg-xfail-if "" { "powerpc-ibm-aix*" } { "-maltivec" } { "" } } */
+/* { dg-options "-save-temps -maltivec" } */
+
+#include <altivec.h>
+
+#define vector_float vector float
+#define vector_float_foo vector float foo
+#define vector_float_bar_eq vector float bar =
+
+/* NB: Keep the following split across three lines. */
+vector
+int
+a1 = { 100, 200, 300, 400 };
+
+vector_float f1 = { 1.0, 2.0, 3.0, 4.0 };
+vector_float_foo = { 3.0, 4.0, 5.0, 6.0 };
+vector_float_bar_eq { 8.0, 7.0, 6.0, 5.0 };
+
+/* { dg-final { cleanup-saved-temps } } */