-// RUN: clang-cc %s -verify -fsyntax-only
+// RUN: clang-cc %s -verify -fsyntax-only -Wvector-conversions
typedef unsigned int v2u __attribute__ ((vector_size (8)));
typedef signed int v2s __attribute__ ((vector_size (8)));
typedef signed int v1s __attribute__ ((vector_size (4)));
-// RUN: clang-cc -fsyntax-only %s -verify
+// RUN: clang-cc -fsyntax-only %s -verify -Wvector-conversions
typedef long long t1 __attribute__ ((vector_size (8)));
typedef char t2 __attribute__ ((vector_size (16)));
char *r3 = (char *)v1; // -expected-error {{invalid conversion between vector\
type 't1' and scalar type 'char *'}}
}
+
+
+void f2(t2 X);
+
+void f3(t3 Y) {
+ f2(Y); // expected-warning {{incompatible vector types passing 't3', expected 't2'}}
+}
+