diff options
Diffstat (limited to 'test/Sema/vector-ops.c')
-rw-r--r-- | test/Sema/vector-ops.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/test/Sema/vector-ops.c b/test/Sema/vector-ops.c index ca39737..3ab75d0 100644 --- a/test/Sema/vector-ops.c +++ b/test/Sema/vector-ops.c @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 %s -verify -fsyntax-only -Wvector-conversions +// RUN: %clang_cc1 %s -verify -fsyntax-only -Wvector-conversion typedef unsigned int v2u __attribute__ ((vector_size (8))); typedef int v2s __attribute__ ((vector_size (8))); typedef float v2f __attribute__ ((vector_size(8))); @@ -13,8 +13,9 @@ void test1(v2u v2ua, v2s v2sa, v2f v2fa) { (void)(~v2fa); // expected-error{{invalid argument type 'v2f' to unary}} // Comparison operators - v2ua = (v2ua==v2sa); - + v2ua = (v2ua==v2sa); // expected-warning{{incompatible vector types assigning to 'v2u' from 'int __attribute__((ext_vector_type(2)))'}} + v2sa = (v2ua==v2sa); + // Arrays int array1[v2ua]; // expected-error{{size of array has non-integer type 'v2u'}} int array2[17]; |