diff options
author | John Thompson <John.Thompson.JTSoftware@gmail.com> | 2010-06-30 22:55:51 +0000 |
---|---|---|
committer | John Thompson <John.Thompson.JTSoftware@gmail.com> | 2010-06-30 22:55:51 +0000 |
commit | 8bb59a828ef21d0b2ed2b0efab60e4eddcb81c62 (patch) | |
tree | 3e7cdd189a6668b9625b3461e645c16a58ee6227 /test/Parser/cxx-altivec.cpp | |
parent | ff6f66e33f234d4bba16c9149476d691e2c96ca9 (diff) |
Fix vector literal/cast confusion - bug 6895.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107347 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Parser/cxx-altivec.cpp')
-rw-r--r-- | test/Parser/cxx-altivec.cpp | 8 |
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))); |