diff options
Diffstat (limited to 'test/Parser/altivec.c')
-rw-r--r-- | test/Parser/altivec.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/test/Parser/altivec.c b/test/Parser/altivec.c index c2a32cf..ed14457 100644 --- a/test/Parser/altivec.c +++ b/test/Parser/altivec.c @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -faltivec -fsyntax-only -verify %s +// RUN: %clang_cc1 -triple=powerpc-apple-darwin8 -faltivec -fsyntax-only -verify %s __vector char vv_c; __vector signed char vv_sc; @@ -40,6 +40,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 +83,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; |