1 // RUN: %clang_cc1 -fsyntax-only -DERR -verify %s
2 // RUN: %clang_cc1 -fsyntax-only -verify %s -Wno-error=vec-elem-size
3 // RUN: %clang_cc1 -fsyntax-only -DEXT -DERR -verify %s
4 // RUN: %clang_cc1 -fsyntax-only -DEXT -verify %s -Wno-error=vec-elem-size
7 typedef __attribute__((__ext_vector_type__(8))) char vector_char8
;
8 typedef __attribute__((__ext_vector_type__(8))) short vector_short8
;
9 typedef __attribute__((__ext_vector_type__(8))) int vector_int8
;
10 typedef __attribute__((__ext_vector_type__(8))) unsigned char vector_uchar8
;
11 typedef __attribute__((__ext_vector_type__(8))) unsigned short vector_ushort8
;
12 typedef __attribute__((__ext_vector_type__(8))) unsigned int vector_uint8
;
13 typedef __attribute__((__ext_vector_type__(4))) char vector_char4
;
14 typedef __attribute__((__ext_vector_type__(4))) short vector_short4
;
15 typedef __attribute__((__ext_vector_type__(4))) int vector_int4
;
16 typedef __attribute__((__ext_vector_type__(4))) unsigned char vector_uchar4
;
17 typedef __attribute__((__ext_vector_type__(4))) unsigned short vector_ushort4
;
18 typedef __attribute__((__ext_vector_type__(4))) unsigned int vector_uint4
;
20 typedef __attribute__((vector_size(8))) char vector_char8
;
21 typedef __attribute__((vector_size(16))) short vector_short8
;
22 typedef __attribute__((vector_size(32))) int vector_int8
;
23 typedef __attribute__((vector_size(8))) unsigned char vector_uchar8
;
24 typedef __attribute__((vector_size(16))) unsigned short vector_ushort8
;
25 typedef __attribute__((vector_size(32))) unsigned int vector_uint8
;
26 typedef __attribute__((vector_size(4))) char vector_char4
;
27 typedef __attribute__((vector_size(4))) short vector_short4
;
28 typedef __attribute__((vector_size(16))) int vector_int4
;
29 typedef __attribute__((vector_size(4))) unsigned char vector_uchar4
;
30 typedef __attribute__((vector_size(8))) unsigned short vector_ushort4
;
31 typedef __attribute__((vector_size(16))) unsigned int vector_uint4
;
84 vi8
= vi8
<< vuc8
; // expected-error {{vector operands do not have the same elements sizes}}
85 vuc8
= vuc8
<< vi8
; // expected-error {{vector operands do not have the same elements sizes}}
86 vus8
= vus8
<< vui8
; // expected-error {{vector operands do not have the same elements sizes}}
87 vui8
= vui8
<< vs8
; // expected-error {{vector operands do not have the same elements sizes}}
89 vi8
= vi8
<< vuc8
; // expected-warning {{vector operands do not have the same elements sizes}}
90 vuc8
= vuc8
<< vi8
; // expected-warning {{vector operands do not have the same elements sizes}}
91 vus8
= vus8
<< vui8
; // expected-warning {{vector operands do not have the same elements sizes}}
92 vui8
= vui8
<< vs8
; // expected-warning {{vector operands do not have the same elements sizes}}
97 vi8
<<= vuc8
; // expected-error {{vector operands do not have the same elements sizes}}
98 vuc8
<<= vi8
; // expected-error {{vector operands do not have the same elements sizes}}
99 vus8
<<= vui8
; // expected-error {{vector operands do not have the same elements sizes}}
100 vui8
<<= vs8
; // expected-error {{vector operands do not have the same elements sizes}}
102 vi8
<<= vuc8
; // expected-warning {{vector operands do not have the same elements sizes}}
103 vuc8
<<= vi8
; // expected-warning {{vector operands do not have the same elements sizes}}
104 vus8
<<= vui8
; // expected-warning {{vector operands do not have the same elements sizes}}
105 vui8
<<= vs8
; // expected-warning {{vector operands do not have the same elements sizes}}
108 c
<<= vc8
; // expected-error {{assigning to 'char' from incompatible type}}
109 i
<<= vuc8
; // expected-error {{assigning to 'int' from incompatible type}}
110 uc
<<= vi8
; // expected-error {{assigning to 'unsigned char' from incompatible type}}
111 us
<<= vui8
; // expected-error {{assigning to 'unsigned short' from incompatible type}}
112 ui
<<= vs8
; // expected-error {{assigning to 'unsigned int' from incompatible type}}