aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/pch/faltivec-1.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.dg/pch/faltivec-1.c')
-rw-r--r--gcc/testsuite/gcc.dg/pch/faltivec-1.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/pch/faltivec-1.c b/gcc/testsuite/gcc.dg/pch/faltivec-1.c
new file mode 100644
index 00000000000..5824d4155cc
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pch/faltivec-1.c
@@ -0,0 +1,17 @@
+/* APPLE LOCAL file AltiVec */
+/* { dg-do compile { target powerpc-*-darwin* } } */
+/* { dg-options "-faltivec -I. -mcpu=G5" } */
+
+#include "faltivec-1.h"
+/* { dg-error "No such file or directory" "" { target *-*-* } 5 } */
+/* { dg-error "one or more PCH files were found" "" { target *-*-* } 5 } */
+/* { dg-error "use -Winvalid-pch for more information" "" { target *-*-* } 5 } */
+
+/* Test for correct PCH validation of -faltivec. */
+void foo()
+{
+ const vector signed short vconst = (vector signed short) (0,0,0,0,0,0,0,0);
+ const vector signed short vconst2 = vec_splat(vconst, 0);
+ bar();
+}
+