aboutsummaryrefslogtreecommitdiff
path: root/test/SemaCXX/altivec.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/SemaCXX/altivec.cpp')
-rw-r--r--test/SemaCXX/altivec.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/test/SemaCXX/altivec.cpp b/test/SemaCXX/altivec.cpp
new file mode 100644
index 000000000000..cdfc00a5d43a
--- /dev/null
+++ b/test/SemaCXX/altivec.cpp
@@ -0,0 +1,18 @@
+// RUN: %clang_cc1 -faltivec -fno-lax-vector-conversions -triple powerpc-unknown-unknown -verify %s
+
+typedef int V4i __attribute__((vector_size(16)));
+
+void f(V4i a)
+{
+}
+
+void test()
+{
+ V4i vGCC;
+ vector int vAltiVec;
+
+ f(vAltiVec);
+ vGCC = vAltiVec;
+ vGCC = vGCC > vAltiVec;
+ vAltiVec = 0 ? vGCC : vGCC;
+}