Introduce implicit conversions between AltiVec vectors and GCC
vectors, from Anton Yartsev!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110437 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/Sema/altivec-init.c b/test/Sema/altivec-init.c
index 57abc93..b5758bc 100644
--- a/test/Sema/altivec-init.c
+++ b/test/Sema/altivec-init.c
@@ -14,3 +14,22 @@
// FIXME: test that (type)(fn)(args) still works with -faltivec
// FIXME: test that c++ overloaded commas still work -faltivec
}
+
+void __attribute__((__overloadable__)) f(v4 a)
+{
+}
+
+void __attribute__((__overloadable__)) f(int a)
+{
+}
+
+void test()
+{
+ v4 vGCC;
+ vector int vAltiVec;
+
+ f(vAltiVec);
+ vGCC = vAltiVec;
+ vGCC = vGCC > vAltiVec;
+ vAltiVec = 0 ? vGCC : vGCC;
+}