1 // REQUIRES: systemz-registered-target
2 // RUN: %clang_cc1 -target-cpu arch15 -triple s390x-linux-gnu \
3 // RUN: -fzvector -flax-vector-conversions=none \
4 // RUN: -Wall -Wno-unused -Werror -fsyntax-only -verify %s
8 volatile vector
signed char vsc
;
9 volatile vector
signed short vss
;
10 volatile vector
signed int vsi
;
11 volatile vector
signed long long vsl
;
12 volatile vector
signed __int128 vslll
;
13 volatile vector
unsigned char vuc
;
14 volatile vector
unsigned short vus
;
15 volatile vector
unsigned int vui
;
16 volatile vector
unsigned long long vul
;
17 volatile vector
unsigned __int128 vulll
;
18 volatile vector
bool char vbc
;
19 volatile vector
bool short vbs
;
20 volatile vector
bool int vbi
;
21 volatile vector
bool long long vbl
;
22 volatile vector
bool __int128 vblll
;
23 volatile vector
double vd
;
25 volatile signed char sc
;
26 volatile signed short ss
;
27 volatile signed int si
;
28 volatile signed long long sl
;
29 volatile unsigned char uc
;
30 volatile unsigned short us
;
31 volatile unsigned int ui
;
32 volatile unsigned long long ul
;
35 const void * volatile cptr
;
36 const signed char * volatile cptrsc
;
37 const signed short * volatile cptrss
;
38 const signed int * volatile cptrsi
;
39 const signed long long * volatile cptrsl
;
40 const unsigned char * volatile cptruc
;
41 const unsigned short * volatile cptrus
;
42 const unsigned int * volatile cptrui
;
43 const unsigned long long * volatile cptrul
;
44 const float * volatile cptrf
;
45 const double * volatile cptrd
;
48 signed char * volatile ptrsc
;
49 signed short * volatile ptrss
;
50 signed int * volatile ptrsi
;
51 signed long long * volatile ptrsl
;
52 unsigned char * volatile ptruc
;
53 unsigned short * volatile ptrus
;
54 unsigned int * volatile ptrui
;
55 unsigned long long * volatile ptrul
;
56 float * volatile ptrf
;
57 double * volatile ptrd
;
59 volatile unsigned int len
;
63 void test_integer(void) {
64 vsc
= vec_evaluate(vsc
, vsc
, vsc
, idx
); // expected-error {{no matching function}} \
65 // expected-error {{argument to '__builtin_s390_veval' must be a constant integer}} \
66 // expected-note@vecintrin.h:* 14 {{candidate function not viable}}
67 // expected-note@vecintrin.h:* 1 {{must be a constant integer}}
68 vuc
= vec_evaluate(vuc
, vuc
, vuc
, idx
); // expected-error {{no matching function}} \
69 // expected-error {{argument to '__builtin_s390_veval' must be a constant integer}} \
70 // expected-note@vecintrin.h:* 13 {{candidate function not viable}}
71 // expected-note@vecintrin.h:* 2 {{must be a constant integer}}
72 vbc
= vec_evaluate(vbc
, vbc
, vbc
, idx
); // expected-error {{no matching function}} \
73 // expected-error {{argument to '__builtin_s390_veval' must be a constant integer}} \
74 // expected-note@vecintrin.h:* 13 {{candidate function not viable}}
75 // expected-note@vecintrin.h:* 2 {{must be a constant integer}}
76 vss
= vec_evaluate(vss
, vss
, vss
, idx
); // expected-error {{no matching function}} \
77 // expected-error {{argument to '__builtin_s390_veval' must be a constant integer}} \
78 // expected-note@vecintrin.h:* 14 {{candidate function not viable}}
79 // expected-note@vecintrin.h:* 1 {{must be a constant integer}}
80 vus
= vec_evaluate(vus
, vus
, vus
, idx
); // expected-error {{no matching function}} \
81 // expected-error {{argument to '__builtin_s390_veval' must be a constant integer}} \
82 // expected-note@vecintrin.h:* 13 {{candidate function not viable}}
83 // expected-note@vecintrin.h:* 2 {{must be a constant integer}}
84 vbs
= vec_evaluate(vbs
, vbs
, vbs
, idx
); // expected-error {{no matching function}} \
85 // expected-error {{argument to '__builtin_s390_veval' must be a constant integer}} \
86 // expected-note@vecintrin.h:* 13 {{candidate function not viable}}
87 // expected-note@vecintrin.h:* 2 {{must be a constant integer}}
88 vsi
= vec_evaluate(vsi
, vsi
, vsi
, idx
); // expected-error {{no matching function}} \
89 // expected-error {{argument to '__builtin_s390_veval' must be a constant integer}} \
90 // expected-note@vecintrin.h:* 14 {{candidate function not viable}}
91 // expected-note@vecintrin.h:* 1 {{must be a constant integer}}
92 vui
= vec_evaluate(vui
, vui
, vui
, idx
); // expected-error {{no matching function}} \
93 // expected-error {{argument to '__builtin_s390_veval' must be a constant integer}} \
94 // expected-note@vecintrin.h:* 13 {{candidate function not viable}}
95 // expected-note@vecintrin.h:* 2 {{must be a constant integer}}
96 vbi
= vec_evaluate(vbi
, vbi
, vbi
, idx
); // expected-error {{no matching function}} \
97 // expected-error {{argument to '__builtin_s390_veval' must be a constant integer}} \
98 // expected-note@vecintrin.h:* 13 {{candidate function not viable}}
99 // expected-note@vecintrin.h:* 2 {{must be a constant integer}}
100 vsl
= vec_evaluate(vsl
, vsl
, vsl
, idx
); // expected-error {{no matching function}} \
101 // expected-error {{argument to '__builtin_s390_veval' must be a constant integer}} \
102 // expected-note@vecintrin.h:* 14 {{candidate function not viable}}
103 // expected-note@vecintrin.h:* 1 {{must be a constant integer}}
104 vul
= vec_evaluate(vul
, vul
, vul
, idx
); // expected-error {{no matching function}} \
105 // expected-error {{argument to '__builtin_s390_veval' must be a constant integer}} \
106 // expected-note@vecintrin.h:* 13 {{candidate function not viable}}
107 // expected-note@vecintrin.h:* 2 {{must be a constant integer}}
108 vbl
= vec_evaluate(vbl
, vbl
, vbl
, idx
); // expected-error {{no matching function}} \
109 // expected-error {{argument to '__builtin_s390_veval' must be a constant integer}} \
110 // expected-note@vecintrin.h:* 13 {{candidate function not viable}}
111 // expected-note@vecintrin.h:* 2 {{must be a constant integer}}
112 vslll
= vec_evaluate(vslll
, vslll
, vslll
, idx
); // expected-error {{no matching function}} \
113 // expected-error {{argument to '__builtin_s390_veval' must be a constant integer}} \
114 // expected-note@vecintrin.h:* 14 {{candidate function not viable}}
115 // expected-note@vecintrin.h:* 1 {{must be a constant integer}}
116 vulll
= vec_evaluate(vulll
, vulll
, vulll
, idx
); // expected-error {{no matching function}} \
117 // expected-error {{argument to '__builtin_s390_veval' must be a constant integer}} \
118 // expected-note@vecintrin.h:* 13 {{candidate function not viable}}
119 // expected-note@vecintrin.h:* 2 {{must be a constant integer}}
120 vblll
= vec_evaluate(vblll
, vblll
, vblll
, idx
); // expected-error {{no matching function}} \
121 // expected-error {{argument to '__builtin_s390_veval' must be a constant integer}} \
122 // expected-note@vecintrin.h:* 13 {{candidate function not viable}}
123 // expected-note@vecintrin.h:* 2 {{must be a constant integer}}