supported: AltiVec vector initialization with a single literal according to PIM section 2.5.1 - after initialization all elements have the value specified by the literal

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128375 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/Sema/altivec-init.c b/test/Sema/altivec-init.c
index ef6fe4b..973aab1 100644
--- a/test/Sema/altivec-init.c
+++ b/test/Sema/altivec-init.c
@@ -9,6 +9,18 @@
   a = (v8){4, 2};
   b = (v4)(5, 6, 7, 8, 9); // expected-warning {{excess elements in vector initializer}}
   b = (v4)(5, 6, 8, 8.0f);
+
+  vector int vi;
+  vi = (vector int)(1);
+  vi = (vector int)(1, 2);          // expected-error {{number of elements must be either one or match the size of the vector}}
+  vi = (vector int)(1, 2, 3, 4);
+  vi = (vector int)(1, 2, 3, 4, 5); // expected-warning {{excess elements in vector initializer}}
+  vi = (vector int){1};
+  vi = (vector int){1, 2};
+  vi = (vector int){1, 2, 3, 4, 5}; // expected-warning {{excess elements in vector initializer}}
+  vector float vf;
+  vf = (vector float)(1.0);
+
   return (v8){0, 1, 2, 3, 1, 2, 3, 4};
 
   // FIXME: test that (type)(fn)(args) still works with -faltivec