1 // RUN: %clang_cc1 -triple s390x-linux-gnu -fzvector \
2 // RUN: -flax-vector-conversions=none -W -Wall -Wconversion \
3 // RUN: -Werror -fsyntax-only -verify %s
5 vector
signed char sc
, sc2
;
6 vector
unsigned char uc
, uc2
;
7 vector
bool char bc
, bc2
;
9 vector
signed short ss
, ss2
;
10 vector
unsigned short us
, us2
;
11 vector
bool short bs
, bs2
;
13 vector
signed int si
, si2
;
14 vector
unsigned int ui
, ui2
;
15 vector
bool int bi
, bi2
;
17 vector
signed long long sl
, sl2
;
18 vector
unsigned long long ul
, ul2
;
19 vector
bool long long bl
, bl2
;
21 vector
double fd
, fd2
;
23 vector
long ll
; // expected-error {{cannot use 'long' with '__vector'}}
24 vector
float ff
; // expected-error {{cannot use 'float' with '__vector'}}
26 signed char sc_scalar
;
27 unsigned char uc_scalar
;
29 signed short ss_scalar
;
30 unsigned short us_scalar
;
33 unsigned int ui_scalar
;
35 signed long sl_scalar
;
36 unsigned long ul_scalar
;
40 // Verify that __vector is also recognized
41 __vector
signed char sc3
;
42 __vector
unsigned char uc3
;
43 __vector
bool char bc3
;
44 __vector
signed short ss3
;
45 __vector
unsigned short us3
;
46 __vector
bool short bs3
;
47 __vector
signed int si3
;
48 __vector
unsigned int ui3
;
49 __vector
bool int bi3
;
50 __vector
signed long long sl3
;
51 __vector
unsigned long long ul3
;
52 __vector
bool long long bl3
;
54 __vector
long ll3
; // expected-error {{cannot use 'long' with '__vector'}}
55 __vector
float ff3
; // expected-error {{cannot use 'float' with '__vector'}}
57 // Likewise for __bool
58 vector __bool
char bc4
;
59 vector __bool
short bs4
;
60 vector __bool
int bi4
;
61 vector __bool
long long bl4
;
62 __vector __bool
char bc5
;
63 __vector __bool
short bs5
;
64 __vector __bool
int bi5
;
65 __vector __bool
long long bl5
;
67 // Verify operation of vec_step
68 int res_sc
[vec_step(sc
) == 16 ? 1 : -1];
69 int res_uc
[vec_step(uc
) == 16 ? 1 : -1];
70 int res_bc
[vec_step(bc
) == 16 ? 1 : -1];
71 int res_ss
[vec_step(ss
) == 8 ? 1 : -1];
72 int res_us
[vec_step(us
) == 8 ? 1 : -1];
73 int res_bs
[vec_step(bs
) == 8 ? 1 : -1];
74 int res_si
[vec_step(si
) == 4 ? 1 : -1];
75 int res_ui
[vec_step(ui
) == 4 ? 1 : -1];
76 int res_bi
[vec_step(bi
) == 4 ? 1 : -1];
77 int res_sl
[vec_step(sl
) == 2 ? 1 : -1];
78 int res_ul
[vec_step(ul
) == 2 ? 1 : -1];
79 int res_bl
[vec_step(bl
) == 2 ? 1 : -1];
80 int res_fd
[vec_step(fd
) == 2 ? 1 : -1];
85 // -------------------------------------------------------------------------
87 // -------------------------------------------------------------------------
106 sc
= uc2
; // expected-error {{incompatible type}}
107 sc
= bc2
; // expected-error {{incompatible type}}
108 uc
= sc2
; // expected-error {{incompatible type}}
109 uc
= bc2
; // expected-error {{incompatible type}}
110 bc
= sc2
; // expected-error {{incompatible type}}
111 bc
= uc2
; // expected-error {{incompatible type}}
113 sc
= sc_scalar
; // expected-error {{incompatible type}}
114 sc
= uc_scalar
; // expected-error {{incompatible type}}
115 uc
= sc_scalar
; // expected-error {{incompatible type}}
116 uc
= uc_scalar
; // expected-error {{incompatible type}}
117 bc
= sc_scalar
; // expected-error {{incompatible type}}
118 bc
= uc_scalar
; // expected-error {{incompatible type}}
120 sc
= ss2
; // expected-error {{incompatible type}}
121 sc
= si2
; // expected-error {{incompatible type}}
122 sc
= sl2
; // expected-error {{incompatible type}}
123 sc
= fd2
; // expected-error {{incompatible type}}
125 ss
= sc2
; // expected-error {{incompatible type}}
126 si
= sc2
; // expected-error {{incompatible type}}
127 sl
= sc2
; // expected-error {{incompatible type}}
128 fd
= sc2
; // expected-error {{incompatible type}}
130 uc
= us2
; // expected-error {{incompatible type}}
131 uc
= ui2
; // expected-error {{incompatible type}}
132 uc
= ul2
; // expected-error {{incompatible type}}
133 uc
= fd2
; // expected-error {{incompatible type}}
135 us
= uc2
; // expected-error {{incompatible type}}
136 ui
= uc2
; // expected-error {{incompatible type}}
137 ul
= uc2
; // expected-error {{incompatible type}}
138 fd
= uc2
; // expected-error {{incompatible type}}
140 bc
= us2
; // expected-error {{incompatible type}}
141 bc
= ui2
; // expected-error {{incompatible type}}
142 bc
= ul2
; // expected-error {{incompatible type}}
143 bc
= fd2
; // expected-error {{incompatible type}}
145 bs
= bc2
; // expected-error {{incompatible type}}
146 bi
= bc2
; // expected-error {{incompatible type}}
147 bl
= bc2
; // expected-error {{incompatible type}}
148 fd
= bc2
; // expected-error {{incompatible type}}
150 // -------------------------------------------------------------------------
151 // Test casts to same element width.
152 // -------------------------------------------------------------------------
154 sc
= (vector
signed char)bc2
;
155 bc
= (vector
bool char)uc2
;
156 uc
= (vector
unsigned char)sc2
;
158 ss
= (vector
signed short)bs2
;
159 bs
= (vector
bool short)us2
;
160 us
= (vector
unsigned short)ss2
;
162 si
= (vector
signed int)bi2
;
163 bi
= (vector
bool int)ui2
;
164 ui
= (vector
unsigned int)si2
;
166 sl
= (vector
signed long long)bl2
;
167 bl
= (vector
bool long long)ul2
;
168 ul
= (vector
unsigned long long)fd2
;
169 fd
= (vector
double)sl2
;
171 // -------------------------------------------------------------------------
172 // Test casts to different element width.
173 // -------------------------------------------------------------------------
175 sc
= (vector
signed char)bs2
;
176 bc
= (vector
bool char)us2
;
177 uc
= (vector
unsigned char)fd2
;
179 ss
= (vector
signed short)bi2
;
180 bs
= (vector
bool short)ui2
;
181 us
= (vector
unsigned short)fd2
;
183 si
= (vector
signed int)bl2
;
184 bi
= (vector
bool int)ul2
;
185 ui
= (vector
unsigned int)fd2
;
187 sl
= (vector
signed long long)bc2
;
188 bl
= (vector
bool long long)uc2
;
189 ul
= (vector
unsigned long long)sc2
;
190 fd
= (vector
double)sc2
;
192 // -------------------------------------------------------------------------
194 // -------------------------------------------------------------------------
198 ++bc2
; // expected-error {{cannot increment}}
202 ++bs2
; // expected-error {{cannot increment}}
206 ++bi2
; // expected-error {{cannot increment}}
210 ++bl2
; // expected-error {{cannot increment}}
216 bc
++; // expected-error {{cannot increment}}
220 bs
++; // expected-error {{cannot increment}}
224 bi
++; // expected-error {{cannot increment}}
228 bl
++; // expected-error {{cannot increment}}
232 // -------------------------------------------------------------------------
234 // -------------------------------------------------------------------------
238 --bc2
; // expected-error {{cannot decrement}}
242 --bs2
; // expected-error {{cannot decrement}}
246 --bi2
; // expected-error {{cannot decrement}}
250 --bl2
; // expected-error {{cannot decrement}}
256 bc
--; // expected-error {{cannot decrement}}
260 bs
--; // expected-error {{cannot decrement}}
264 bi
--; // expected-error {{cannot decrement}}
268 bl
--; // expected-error {{cannot decrement}}
272 // -------------------------------------------------------------------------
274 // -------------------------------------------------------------------------
278 bc
= +bc2
; // expected-error {{invalid argument type}}
282 bs
= +bs2
; // expected-error {{invalid argument type}}
286 bi
= +bi2
; // expected-error {{invalid argument type}}
290 bl
= +bl2
; // expected-error {{invalid argument type}}
294 sc
= +si2
; // expected-error {{assigning to}}
295 ui
= +si2
; // expected-error {{assigning to}}
296 ui
= +bi2
; // expected-error {{invalid argument type}}
298 // -------------------------------------------------------------------------
300 // -------------------------------------------------------------------------
304 bc
= -bc2
; // expected-error {{invalid argument type}}
308 bs
= -bs2
; // expected-error {{invalid argument type}}
312 bi
= -bi2
; // expected-error {{invalid argument type}}
316 bl
= -bl2
; // expected-error {{invalid argument type}}
320 sc
= -si2
; // expected-error {{assigning to}}
321 ui
= -si2
; // expected-error {{assigning to}}
322 ui
= -bi2
; // expected-error {{invalid argument type}}
324 // -------------------------------------------------------------------------
326 // -------------------------------------------------------------------------
344 fd
= ~fd2
; // expected-error {{invalid argument}}
346 sc
= ~si2
; // expected-error {{assigning to}}
347 ui
= ~si2
; // expected-error {{assigning to}}
348 ui
= ~bi2
; // expected-error {{assigning to}}
350 // -------------------------------------------------------------------------
352 // -------------------------------------------------------------------------
355 sc
= sc
+ uc2
; // expected-error {{cannot convert}}
356 sc
= uc
+ sc2
; // expected-error {{cannot convert}}
361 uc
= sc
+ uc2
; // expected-error {{cannot convert}}
362 uc
= uc
+ sc2
; // expected-error {{cannot convert}}
366 bc
= bc
+ bc2
; // expected-error {{invalid operands}}
367 bc
= bc
+ uc2
; // expected-error {{incompatible type}}
368 bc
= uc
+ bc2
; // expected-error {{incompatible type}}
369 bc
= bc
+ sc2
; // expected-error {{incompatible type}}
370 bc
= sc
+ bc2
; // expected-error {{incompatible type}}
373 sc
= sc
+ uc_scalar
; // expected-error {{cannot convert between scalar type 'unsigned char' and vector type '__vector signed char' (vector of 16 'signed char' values) as implicit conversion would cause truncation}}
375 sc
= uc_scalar
+ sc
; // expected-error {{cannot convert between scalar type 'unsigned char' and vector type '__vector signed char' (vector of 16 'signed char' values) as implicit conversion would cause truncation}}
376 uc
= uc
+ sc_scalar
; // expected-error {{implicit conversion changes signedness: 'signed char' to '__vector unsigned char' (vector of 16 'unsigned char' values)}}
378 uc
= sc_scalar
+ uc
; // expected-error {{implicit conversion changes signedness: 'signed char' to '__vector unsigned char' (vector of 16 'unsigned char' values)}}
383 bs
= bs
+ bs2
; // expected-error {{invalid operands}}
387 bi
= bi
+ bi2
; // expected-error {{invalid operands}}
391 bl
= bl
+ bl2
; // expected-error {{invalid operands}}
394 fd
= fd
+ ul2
; // expected-error {{cannot convert}}
395 fd
= sl
+ fd2
; // expected-error {{cannot convert}}
398 sc
+= uc2
; // expected-error {{cannot convert}}
402 uc
+= sc2
; // expected-error {{cannot convert}}
405 bc
+= bc2
; // expected-error {{invalid operands}}
406 bc
+= sc2
; // expected-error {{cannot convert}}
407 bc
+= uc2
; // expected-error {{cannot convert}}
409 sc
+= ss2
; // expected-error {{cannot convert}}
410 sc
+= si2
; // expected-error {{cannot convert}}
411 sc
+= sl2
; // expected-error {{cannot convert}}
412 sc
+= fd2
; // expected-error {{cannot convert}}
415 sc
+= uc_scalar
; // expected-error {{cannot convert between scalar type 'unsigned char' and vector type '__vector signed char' (vector of 16 'signed char' values) as implicit conversion would cause truncation}}
416 uc
+= sc_scalar
; // expected-error {{implicit conversion changes signedness: 'signed char' to '__vector unsigned char' (vector of 16 'unsigned char' values)}}
421 bs
+= bs2
; // expected-error {{invalid operands}}
425 bi
+= bi2
; // expected-error {{invalid operands}}
429 bl
+= bl2
; // expected-error {{invalid operands}}
433 // -------------------------------------------------------------------------
434 // Test that binary + rules apply to binary - too.
435 // -------------------------------------------------------------------------
439 bc
= bc
- bc2
; // expected-error {{invalid operands}}
441 sc
= uc
- sc2
; // expected-error {{cannot convert}}
447 bc
-= bc2
; // expected-error {{invalid operands}}
449 sc
-= uc2
; // expected-error {{cannot convert}}
451 bc
-= sc2
; // expected-error {{cannot convert}}
455 bs
-= bs2
; // expected-error {{invalid operands}}
459 bi
-= bi2
; // expected-error {{invalid operands}}
463 bl
-= bl2
; // expected-error {{invalid operands}}
467 // -------------------------------------------------------------------------
468 // Test that binary + rules apply to * too. 64-bit integer multiplication
469 // is not required by the spec and so isn't tested here.
470 // -------------------------------------------------------------------------
474 bc
= bc
* bc2
; // expected-error {{invalid operands}}
476 sc
= uc
* sc2
; // expected-error {{cannot convert}}
477 sc
= sc
* bc2
; // expected-error {{cannot convert}}
478 uc
= bc
* uc2
; // expected-error {{cannot convert}}
482 bc
*= bc2
; // expected-error {{invalid operands}}
484 sc
*= uc2
; // expected-error {{cannot convert}}
485 uc
*= bc2
; // expected-error {{cannot convert}}
486 bc
*= sc2
; // expected-error {{cannot convert}}
490 bs
*= bs2
; // expected-error {{invalid operands}}
494 bi
*= bi2
; // expected-error {{invalid operands}}
498 bl
*= bl2
; // expected-error {{invalid operands}}
502 // -------------------------------------------------------------------------
503 // Test that * rules apply to / too.
504 // -------------------------------------------------------------------------
508 bc
= bc
/ bc2
; // expected-error {{invalid operands}}
510 sc
= uc
/ sc2
; // expected-error {{cannot convert}}
511 sc
= sc
/ bc2
; // expected-error {{cannot convert}}
512 uc
= bc
/ uc2
; // expected-error {{cannot convert}}
516 bc
/= bc2
; // expected-error {{invalid operands}}
518 sc
/= uc2
; // expected-error {{cannot convert}}
519 uc
/= bc2
; // expected-error {{cannot convert}}
520 bc
/= sc2
; // expected-error {{cannot convert}}
524 bs
/= bs2
; // expected-error {{invalid operands}}
528 bi
/= bi2
; // expected-error {{invalid operands}}
532 bl
/= bl2
; // expected-error {{invalid operands}}
536 // -------------------------------------------------------------------------
537 // Test that / rules apply to % too, except that doubles are not allowed.
538 // -------------------------------------------------------------------------
542 bc
= bc
% bc2
; // expected-error {{invalid operands}}
544 sc
= uc
% sc2
; // expected-error {{cannot convert}}
545 sc
= sc
% bc2
; // expected-error {{cannot convert}}
546 uc
= bc
% uc2
; // expected-error {{cannot convert}}
550 bc
%= bc2
; // expected-error {{invalid operands}}
552 sc
%= uc2
; // expected-error {{cannot convert}}
553 uc
%= bc2
; // expected-error {{cannot convert}}
554 bc
%= sc2
; // expected-error {{cannot convert}}
558 bs
%= bs2
; // expected-error {{invalid operands}}
562 bi
%= bi2
; // expected-error {{invalid operands}}
566 bl
%= bl2
; // expected-error {{invalid operands}}
568 fd
%= fd2
; // expected-error {{invalid operands}}
570 // -------------------------------------------------------------------------
572 // -------------------------------------------------------------------------
575 sc
= sc
& uc2
; // expected-error {{cannot convert}}
576 sc
= uc
& sc2
; // expected-error {{cannot convert}}
581 uc
= sc
& uc2
; // expected-error {{cannot convert}}
582 uc
= uc
& sc2
; // expected-error {{cannot convert}}
587 bc
= bc
& uc2
; // expected-error {{incompatible type}}
588 bc
= uc
& bc2
; // expected-error {{incompatible type}}
589 bc
= bc
& sc2
; // expected-error {{incompatible type}}
590 bc
= sc
& bc2
; // expected-error {{incompatible type}}
592 fd
= fd
& fd2
; // expected-error {{invalid operands}}
593 fd
= bl
& fd2
; // expected-error {{invalid operands}}
594 fd
= fd
& bl2
; // expected-error {{invalid operands}}
595 fd
= fd
& sl2
; // expected-error {{invalid operands}}
596 fd
= fd
& ul2
; // expected-error {{invalid operands}}
599 sc
&= uc2
; // expected-error {{cannot convert}}
603 uc
&= sc2
; // expected-error {{cannot convert}}
607 bc
&= sc2
; // expected-error {{cannot convert}}
608 bc
&= uc2
; // expected-error {{cannot convert}}
610 sc
&= ss2
; // expected-error {{cannot convert}}
611 sc
&= si2
; // expected-error {{cannot convert}}
612 sc
&= sl2
; // expected-error {{cannot convert}}
613 sc
&= fd2
; // expected-error {{invalid operands}}
615 us
&= bc2
; // expected-error {{cannot convert}}
616 ui
&= bc2
; // expected-error {{cannot convert}}
617 ul
&= bc2
; // expected-error {{cannot convert}}
618 fd
&= bc2
; // expected-error {{invalid operands}}
632 // -------------------------------------------------------------------------
633 // Test that & rules apply to | too.
634 // -------------------------------------------------------------------------
637 sc
= sc
| uc2
; // expected-error {{cannot convert}}
641 uc
= sc
| uc2
; // expected-error {{cannot convert}}
645 bc
= uc
| bc2
; // expected-error {{incompatible type}}
646 bc
= bc
| sc2
; // expected-error {{incompatible type}}
648 fd
= fd
| fd2
; // expected-error {{invalid operands}}
649 fd
= bl
| fd2
; // expected-error {{invalid operands}}
663 fd
|= bl2
; // expected-error {{invalid operands}}
664 fd
|= fd2
; // expected-error {{invalid operands}}
666 // -------------------------------------------------------------------------
667 // Test that & rules apply to ^ too.
668 // -------------------------------------------------------------------------
671 sc
= sc
^ uc2
; // expected-error {{cannot convert}}
675 uc
= sc
^ uc2
; // expected-error {{cannot convert}}
679 bc
= uc
^ bc2
; // expected-error {{incompatible type}}
680 bc
= bc
^ sc2
; // expected-error {{incompatible type}}
682 fd
= fd
^ fd2
; // expected-error {{invalid operands}}
683 fd
= bl
^ fd2
; // expected-error {{invalid operands}}
697 fd
^= bl2
; // expected-error {{invalid operands}}
698 fd
^= fd2
; // expected-error {{invalid operands}}
700 // -------------------------------------------------------------------------
702 // -------------------------------------------------------------------------
706 sc
= uc
<< sc2
; // expected-error {{incompatible type}}
707 sc
= sc
<< bc2
; // expected-error {{invalid operands}}
708 sc
= bc
<< sc2
; // expected-error {{invalid operands}}
711 uc
= sc
<< uc2
; // expected-error {{assigning to}}
713 uc
= bc
<< uc2
; // expected-error {{invalid operands}}
714 uc
= uc
<< bc2
; // expected-error {{invalid operands}}
716 bc
= bc
<< bc2
; // expected-error {{invalid operands}}
717 bc
= bc
<< uc2
; // expected-error {{invalid operands}}
718 bc
= uc
<< bc2
; // expected-error {{invalid operands}}
719 bc
= bc
<< sc2
; // expected-error {{invalid operands}}
720 bc
= sc
<< bc2
; // expected-error {{invalid operands}}
723 sc
= sc
<< 1.0f
; // expected-error {{integer is required}}
724 sc
= sc
<< sc_scalar
;
725 sc
= sc
<< uc_scalar
;
726 sc
= sc
<< ss_scalar
;
727 sc
= sc
<< us_scalar
;
728 sc
= sc
<< si_scalar
;
729 sc
= sc
<< ui_scalar
;
730 sc
= sc
<< sl_scalar
;
731 sc
= sc
<< ul_scalar
;
732 sc
= sc_scalar
<< sc
; // expected-error {{first operand is not a vector}}
733 sc
= uc_scalar
<< sc
; // expected-error {{first operand is not a vector}}
734 uc
= uc
<< sc_scalar
;
735 uc
= uc
<< uc_scalar
;
736 uc
= sc_scalar
<< uc
; // expected-error {{first operand is not a vector}}
737 uc
= uc_scalar
<< uc
; // expected-error {{first operand is not a vector}}
740 ss
= ss
<< ss_scalar
;
742 us
= us
<< us_scalar
;
743 bs
= bs
<< bs2
; // expected-error {{invalid operands}}
746 si
= si
<< si_scalar
;
748 ui
= ui
<< ui_scalar
;
749 bi
= bi
<< bi2
; // expected-error {{invalid operands}}
752 sl
= sl
<< sl_scalar
;
754 ul
= ul
<< ul_scalar
;
755 bl
= bl
<< bl2
; // expected-error {{invalid operands}}
757 fd
= fd
<< fd2
; // expected-error {{integer is required}}
758 fd
= fd
<< ul2
; // expected-error {{integer is required}}
759 fd
= sl
<< fd2
; // expected-error {{integer is required}}
763 sc
<<= bc2
; // expected-error {{invalid operands}}
768 uc
<<= bc2
; // expected-error {{invalid operands}}
771 bc
<<= bc2
; // expected-error {{invalid operands}}
772 bc
<<= sc2
; // expected-error {{invalid operands}}
773 bc
<<= uc2
; // expected-error {{invalid operands}}
775 sc
<<= ss2
; // expected-error {{vector operands do not have the same number of elements}}
776 sc
<<= si2
; // expected-error {{vector operands do not have the same number of elements}}
777 sc
<<= sl2
; // expected-error {{vector operands do not have the same number of elements}}
778 sc
<<= fd2
; // expected-error {{integer is required}}
784 bs
<<= bs2
; // expected-error {{invalid operands}}
790 bi
<<= bi2
; // expected-error {{invalid operands}}
796 bl
<<= bl2
; // expected-error {{invalid operands}}
798 fd
<<= fd2
; // expected-error {{integer is required}}
800 // -------------------------------------------------------------------------
802 // -------------------------------------------------------------------------
806 sc
= uc
>> sc2
; // expected-error {{incompatible type}}
807 sc
= sc
>> bc2
; // expected-error {{invalid operands}}
808 sc
= bc
>> sc2
; // expected-error {{invalid operands}}
811 uc
= sc
>> uc2
; // expected-error {{assigning to}}
813 uc
= bc
>> uc2
; // expected-error {{invalid operands}}
814 uc
= uc
>> bc2
; // expected-error {{invalid operands}}
816 bc
= bc
>> bc2
; // expected-error {{invalid operands}}
817 bc
= bc
>> uc2
; // expected-error {{invalid operands}}
818 bc
= uc
>> bc2
; // expected-error {{invalid operands}}
819 bc
= bc
>> sc2
; // expected-error {{invalid operands}}
820 bc
= sc
>> bc2
; // expected-error {{invalid operands}}
823 sc
= sc
>> 1.0f
; // expected-error {{integer is required}}
824 sc
= sc
>> sc_scalar
;
825 sc
= sc
>> uc_scalar
;
826 sc
= sc
>> ss_scalar
;
827 sc
= sc
>> us_scalar
;
828 sc
= sc
>> si_scalar
;
829 sc
= sc
>> ui_scalar
;
830 sc
= sc
>> sl_scalar
;
831 sc
= sc
>> ul_scalar
;
832 sc
= sc_scalar
>> sc
; // expected-error {{first operand is not a vector}}
833 sc
= uc_scalar
>> sc
; // expected-error {{first operand is not a vector}}
834 uc
= uc
>> sc_scalar
;
835 uc
= uc
>> uc_scalar
;
836 uc
= sc_scalar
>> uc
; // expected-error {{first operand is not a vector}}
837 uc
= uc_scalar
>> uc
; // expected-error {{first operand is not a vector}}
840 ss
= ss
>> ss_scalar
;
842 us
= us
>> us_scalar
;
843 bs
= bs
>> bs2
; // expected-error {{invalid operands}}
846 si
= si
>> si_scalar
;
848 ui
= ui
>> ui_scalar
;
849 bi
= bi
>> bi2
; // expected-error {{invalid operands}}
852 sl
= sl
>> sl_scalar
;
854 ul
= ul
>> ul_scalar
;
855 bl
= bl
>> bl2
; // expected-error {{invalid operands}}
857 fd
= fd
>> fd2
; // expected-error {{integer is required}}
858 fd
= fd
>> ul2
; // expected-error {{integer is required}}
859 fd
= sl
>> fd2
; // expected-error {{integer is required}}
863 sc
>>= bc2
; // expected-error {{invalid operands}}
868 uc
>>= bc2
; // expected-error {{invalid operands}}
871 bc
>>= bc2
; // expected-error {{invalid operands}}
872 bc
>>= sc2
; // expected-error {{invalid operands}}
873 bc
>>= uc2
; // expected-error {{invalid operands}}
875 sc
>>= ss2
; // expected-error {{vector operands do not have the same number of elements}}
876 sc
>>= si2
; // expected-error {{vector operands do not have the same number of elements}}
877 sc
>>= sl2
; // expected-error {{vector operands do not have the same number of elements}}
878 sc
>>= fd2
; // expected-error {{integer is required}}
884 bs
>>= bs2
; // expected-error {{invalid operands}}
890 bi
>>= bi2
; // expected-error {{invalid operands}}
896 bl
>>= bl2
; // expected-error {{invalid operands}}
898 fd
>>= fd2
; // expected-error {{integer is required}}
900 // -------------------------------------------------------------------------
902 // -------------------------------------------------------------------------
908 (void)(sc
== uc
); // expected-error {{cannot convert}}
911 (void)(uc
== sc
); // expected-error {{cannot convert}}
930 (void)(fd
== ul
); // expected-error {{cannot convert}}
931 (void)(ul
== fd
); // expected-error {{cannot convert}}
933 // -------------------------------------------------------------------------
934 // Test that == rules apply to != too.
935 // -------------------------------------------------------------------------
941 (void)(sc
!= uc
); // expected-error {{cannot convert}}
957 // -------------------------------------------------------------------------
958 // Test that == rules apply to <= too.
959 // -------------------------------------------------------------------------
965 (void)(sc
<= uc
); // expected-error {{cannot convert}}
981 // -------------------------------------------------------------------------
982 // Test that == rules apply to >= too.
983 // -------------------------------------------------------------------------
989 (void)(sc
>= uc
); // expected-error {{cannot convert}}
1005 // -------------------------------------------------------------------------
1006 // Test that == rules apply to < too.
1007 // -------------------------------------------------------------------------
1013 (void)(sc
< uc
); // expected-error {{cannot convert}}
1029 // -------------------------------------------------------------------------
1030 // Test that == rules apply to > too.
1031 // -------------------------------------------------------------------------
1037 (void)(sc
> uc
); // expected-error {{cannot convert}}