1 /* { dg-do compile { target powerpc*-*-linux* } } */
2 /* { dg-options "-maltivec" } */
4 /* Valid AltiVec vector types should be accepted with no warnings. */
7 __vector
unsigned char vuc
;
8 __vector
signed char vsc
;
9 __vector __bool
char vbc
;
11 __vector
signed short vsh
;
12 __vector
unsigned short vuh
;
13 __vector
short int vhi
;
14 __vector
signed short int vshi
;
15 __vector
unsigned short int vuhi
;
16 __vector __bool
short vbh
;
17 __vector __bool
short int vbhi
;
19 __vector
unsigned int vui
;
20 __vector
signed int vsi
;
21 __vector __bool
int vbi
;
22 __vector
unsigned vuj
;
27 /* These should be rejected as invalid AltiVec types. */
29 __vector
long long vll
; /* { dg-error "AltiVec types" "" } */
30 __vector
unsigned long long vull
; /* { dg-error "AltiVec types" "" } */
31 __vector
signed long long vsll
; /* { dg-error "AltiVec types" "" } */
32 __vector __bool
long long vbll
; /* { dg-error "AltiVec types" "" } */
33 __vector
long long int vlli
; /* { dg-error "AltiVec types" "" } */
34 __vector
unsigned long long int vulli
; /* { dg-error "AltiVec types" "" } */
35 __vector
signed long long int vslli
; /* { dg-error "AltiVec types" "" } */
36 __vector __bool
long long int vblli
; /* { dg-error "AltiVec types" "" } */
37 __vector
double vd1
; /* { dg-error "AltiVec types" "" } */
38 __vector
long double vld
; /* { dg-error "AltiVec types" "" } */
39 __vector _Bool vb
; /* { dg-error "AltiVec types" "" } */
40 __vector _Complex
float vcf
; /* { dg-error "AltiVec types" "" } */
41 __vector _Complex
double vcd
; /* { dg-error "AltiVec types" "" } */
42 __vector _Complex
long double vcld
; /* { dg-error "AltiVec types" "" } */
43 __vector _Complex
signed char vcsc
; /* { dg-error "AltiVec types" "" } */
44 __vector _Complex
unsigned char vcuc
; /* { dg-error "AltiVec types" "" } */
45 __vector _Complex
short vcss
; /* { dg-error "AltiVec types" "" } */
46 __vector _Complex
unsigned short vcus
; /* { dg-error "AltiVec types" "" } */
47 __vector _Complex
int vcsi
; /* { dg-error "AltiVec types" "" } */
48 __vector _Complex
unsigned int vcui
; /* { dg-error "AltiVec types" "" } */
49 __vector _Complex
long vcsl
; /* { dg-error "AltiVec types" "" } */
50 __vector _Complex
unsigned long vcul
; /* { dg-error "AltiVec types" "" } */
51 __vector _Complex
long long vcsll
; /* { dg-error "AltiVec types" "" } */
52 __vector _Complex
unsigned long long vcull
; /* { dg-error "AltiVec types" "" } */
53 __vector __complex
float v_cf
; /* { dg-error "AltiVec types" "" } */
54 __vector __complex
double v_cd
; /* { dg-error "AltiVec types" "" } */
55 __vector __complex
long double v_cld
; /* { dg-error "AltiVec types" "" } */
56 __vector __complex
signed char v_csc
; /* { dg-error "AltiVec types" "" } */
57 __vector __complex
unsigned char v_cuc
; /* { dg-error "AltiVec types" "" } */
58 __vector __complex
short v_css
; /* { dg-error "AltiVec types" "" } */
59 __vector __complex
unsigned short v_cus
; /* { dg-error "AltiVec types" "" } */
60 __vector __complex
int v_csi
; /* { dg-error "AltiVec types" "" } */
61 __vector __complex
unsigned int v_cui
; /* { dg-error "AltiVec types" "" } */
62 __vector __complex
long v_csl
; /* { dg-error "AltiVec types" "" } */
63 __vector __complex
unsigned long v_cul
; /* { dg-error "AltiVec types" "" } */
64 __vector __complex
long long v_csll
; /* { dg-error "AltiVec types" "" } */
65 __vector __complex
unsigned long long v_cull
; /* { dg-error "AltiVec types" "" } */
67 /* These should be rejected because the component types are invalid. We
68 don't care about the actual error messages here. */
70 __vector __bool
unsigned char vbuc
; /* { dg-error "error" "" } */
71 __vector __bool
signed char vbsc
; /* { dg-error "error" "" } */
72 __vector __bool
unsigned short vbuh
; /* { dg-error "error" "" } */
73 __vector __bool
signed short vbsh
; /* { dg-error "error" "" } */
74 __vector __bool
unsigned int vbui
; /* { dg-error "error" "" } */
75 __vector __bool
signed int vbsi
; /* { dg-error "error" "" } */
76 __vector __bool
unsigned vbuj
; /* { dg-error "error" "" } */
77 __vector __bool
signed vbsj
; /* { dg-error "error" "" } */
78 __vector
signed float vsf
; /* { dg-error "error" "" } */
79 __vector
unsigned float vuf
; /* { dg-error "error" "" } */
80 __vector
short float vsf
; /* { dg-error "error" "" } */
81 __vector
signed double vsd
; /* { dg-error "error" "" } */
82 __vector
unsigned double vud
; /* { dg-error "error" "" } */
83 __vector
short double vsd
; /* { dg-error "error" "" } */
84 __vector __bool
float vbf
; /* { dg-error "error" "" } */
85 __vector __bool
double vbd
; /* { dg-error "error" "" } */
86 __vector __bool
short float blf
; /* { dg-error "error" "" } */
87 __vector __bool
short double vlbd
; /* { dg-error "error" "" } */