diff options
Diffstat (limited to 'test/Parser/cxx-altivec.cpp')
-rw-r--r-- | test/Parser/cxx-altivec.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/test/Parser/cxx-altivec.cpp b/test/Parser/cxx-altivec.cpp index 3610c0e..66d4f32 100644 --- a/test/Parser/cxx-altivec.cpp +++ b/test/Parser/cxx-altivec.cpp @@ -1,5 +1,4 @@ -// RUN: %clang_cc1 -faltivec -fsyntax-only -verify %s - +// RUN: %clang_cc1 -triple=powerpc-apple-darwin8 -faltivec -fsyntax-only -verify %s // This is the same as the C version: __vector char vv_c; @@ -42,6 +41,8 @@ vector int f__r(); void f_a(vector int a); void f_a2(int b, vector int a); +vector int v = (vector int)(-1); + // These should have warnings. __vector long vv_l; // expected-warning {{Use of 'long' with '__vector' is deprecated}} __vector signed long vv_sl; // expected-warning {{Use of 'long' with '__vector' is deprecated}} @@ -81,8 +82,8 @@ void f() { gccvector unsigned int gv = v; gccvector int gvi = (gccvector int)v; __attribute__((vector_size(8))) unsigned int gv8; - gv8 = gccv; // expected-error {{incompatible type assigning '__attribute__((__vector_size__(4 * sizeof(unsigned int)))) unsigned int', expected '__attribute__((__vector_size__(2 * sizeof(unsigned int)))) unsigned int'}} - av = gv8; // expected-error {{incompatible type assigning '__attribute__((__vector_size__(2 * sizeof(unsigned int)))) unsigned int', expected '__vector unsigned int'}} + gv8 = gccv; // expected-error {{assigning to '__attribute__((__vector_size__(2 * sizeof(unsigned int)))) unsigned int' from incompatible type '__attribute__((__vector_size__(4 * sizeof(unsigned int)))) unsigned int'}} + av = gv8; // expected-error {{assigning to '__vector unsigned int' from incompatible type '__attribute__((__vector_size__(2 * sizeof(unsigned int)))) unsigned int'}} v = gccv; __vector unsigned int tv = gccv; |