aboutsummaryrefslogtreecommitdiff
path: root/test/Parser/cxx-altivec.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/Parser/cxx-altivec.cpp')
-rw-r--r--test/Parser/cxx-altivec.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/Parser/cxx-altivec.cpp b/test/Parser/cxx-altivec.cpp
index 7916b4305a..a70eea077e 100644
--- a/test/Parser/cxx-altivec.cpp
+++ b/test/Parser/cxx-altivec.cpp
@@ -118,3 +118,11 @@ class c_v {
void f__a2(int b, vector int a);
};
+
+// bug 6895 - Vectorl literal casting confusion.
+vector char v1 = (vector char)((vector int)(1, 2, 3, 4));
+vector char v2 = (vector char)((vector float)(1.0f, 2.0f, 3.0f, 4.0f));
+vector char v3 = (vector char)((vector int)('a', 'b', 'c', 'd'));
+vector int v4 = (vector int)(1, 2, 3, 4);
+vector float v5 = (vector float)(1.0f, 2.0f, 3.0f, 4.0f);
+vector char v6 = (vector char)((vector int)(1+2, -2, (int)(2.0 * 3), -(5-3)));