aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/altivec-1.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.dg/altivec-1.C')
-rw-r--r--gcc/testsuite/g++.dg/altivec-1.C12
1 files changed, 12 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/altivec-1.C b/gcc/testsuite/g++.dg/altivec-1.C
new file mode 100644
index 00000000000..6bda7094db0
--- /dev/null
+++ b/gcc/testsuite/g++.dg/altivec-1.C
@@ -0,0 +1,12 @@
+/* APPLE LOCAL file AltiVec */
+/* Test for static_cast<...> among AltiVec types. */
+/* { dg-do compile { target powerpc*-*-* } } */
+/* { dg-options "-faltivec" } */
+
+struct Foo2 {
+ vector unsigned int vui;
+ vector signed int As_vsi() {
+ return static_cast<vector signed int>(vui); /* { dg-bogus "invalid static_cast" } */
+ }
+};
+