1 // RUN: %clang_cc1 -target-feature +altivec -flax-vector-conversions=none -triple powerpc-unknown-unknown -fcxx-exceptions -verify %s
3 typedef int V4i
__attribute__((vector_size(16)));
5 void test_vec_step(vector
short arg1
) {
7 vector
signed char vsc
;
8 vector
unsigned char vuc
;
11 vector
unsigned short vus
;
15 vector
unsigned int vui
;
20 int res1
[vec_step(arg1
) == 8 ? 1 : -1];
21 int res2
[vec_step(vbc
) == 16 ? 1 : -1];
22 int res3
[vec_step(vsc
) == 16 ? 1 : -1];
23 int res4
[vec_step(vuc
) == 16 ? 1 : -1];
24 int res5
[vec_step(vbs
) == 8 ? 1 : -1];
25 int res6
[vec_step(vs
) == 8 ? 1 : -1];
26 int res7
[vec_step(vus
) == 8 ? 1 : -1];
27 int res8
[vec_step(vp
) == 8 ? 1 : -1];
28 int res9
[vec_step(vbi
) == 4 ? 1 : -1];
29 int res10
[vec_step(vi
) == 4 ? 1 : -1];
30 int res11
[vec_step(vui
) == 4 ? 1 : -1];
31 int res12
[vec_step(vf
) == 4 ? 1 : -1];
32 int res13
[vec_step(*pvi
) == 4 ? 1 : -1];
46 bool res
= vGCC
> vAltiVec
;
47 vAltiVec
= 0 ? vGCC
: vGCC
;
51 void template_f(T param
) {
65 ++vi
=vi
; // expected-warning {{unsequenced}}
70 namespace LValueToRValueConversions
{
76 vector
float initFloat
= (vector
float)(Struct().f
); // expected-error {{did you mean to call it}}
77 vector
int initInt
= (vector
int)(Struct().n
); // expected-error {{did you mean to call it}}
82 catch (vector pixel px
) {}