From 39fcc9a984e2820e4ea0fa2ac4abd17d9f3a31df Mon Sep 17 00:00:00 2001 From: dim Date: Sun, 20 Feb 2011 13:06:31 +0000 Subject: Vendor import of clang trunk r126079: http://llvm.org/svn/llvm-project/cfe/trunk@126079 --- test/Sema/vector-init.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'test/Sema/vector-init.c') diff --git a/test/Sema/vector-init.c b/test/Sema/vector-init.c index 8f81adc..5be040a 100644 --- a/test/Sema/vector-init.c +++ b/test/Sema/vector-init.c @@ -33,3 +33,12 @@ __attribute__((vector_size(16))) float f2( typedef float __attribute__((ext_vector_type (3))) float3; int test2[sizeof(float3) == sizeof(float4) ? 1 : -1]; +// rdar://problem/8345836 +typedef long long __attribute__((vector_size(16))) longlong2; +typedef short __attribute__((vector_size(16))) short8; +typedef short __attribute__((vector_size(8))) short4; +void test3() { + extern short8 test3_helper(void); + longlong2 arr1[2] = { test3_helper(), test3_helper() }; + short4 arr2[2] = { test3_helper(), test3_helper() }; // expected-error 2 {{initializing 'short4' with an expression of incompatible type 'short8'}} +} -- cgit v1.1