Debian Codegraph @

clang/test/CodeGen/SystemZ/builtins-systemz-zvector3-error.c

raw
1 // REQUIRES: systemz-registered-target
2 // RUN: %clang_cc1 -target-cpu z15 -triple s390x-linux-gnu \
3 // RUN: -fzvector -flax-vector-conversions=none \
4 // RUN: -Wall -Wno-unused -Werror -fsyntax-only -verify %s
5
6 #include <vecintrin.h>
7
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 float vf;
23 volatile vector double vd;
24
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;
33 volatile float f;
34 volatile double d;
35
36 const void * volatile cptr;
37 const signed char * volatile cptrsc;
38 const signed short * volatile cptrss;
39 const signed int * volatile cptrsi;
40 const signed long long * volatile cptrsl;
41 const unsigned char * volatile cptruc;
42 const unsigned short * volatile cptrus;
43 const unsigned int * volatile cptrui;
44 const unsigned long long * volatile cptrul;
45 const float * volatile cptrf;
46 const double * volatile cptrd;
47
48 void * volatile ptr;
49 signed char * volatile ptrsc;
50 signed short * volatile ptrss;
51 signed int * volatile ptrsi;
52 signed long long * volatile ptrsl;
53 unsigned char * volatile ptruc;
54 unsigned short * volatile ptrus;
55 unsigned int * volatile ptrui;
56 unsigned long long * volatile ptrul;
57 float * volatile ptrf;
58 double * volatile ptrd;
59
60 volatile unsigned int len;
61 volatile int idx;
62 int cc;
63
64 void test_integer(void) {
65 vsc = vec_sldb(vsc, vsc, idx); // expected-error {{no matching function}} \
66 // expected-error {{argument to '__builtin_s390_vsld' must be a constant integer}}
67 // [email protected]:* 11 {{candidate function not viable}}
68 // [email protected]:* 1 {{must be a constant integer from 0 to 7}}
69 vuc = vec_sldb(vuc, vuc, idx); // expected-error {{no matching function}} \
70 // expected-error {{argument to '__builtin_s390_vsld' must be a constant integer}}
71 // [email protected]:* 11 {{candidate function not viable}}
72 // [email protected]:* 1 {{must be a constant integer from 0 to 7}}
73 vss = vec_sldb(vss, vss, idx); // expected-error {{no matching function}} \
74 // expected-error {{argument to '__builtin_s390_vsld' must be a constant integer}}
75 // [email protected]:* 11 {{candidate function not viable}}
76 // [email protected]:* 1 {{must be a constant integer from 0 to 7}}
77 vus = vec_sldb(vus, vus, idx); // expected-error {{no matching function}} \
78 // expected-error {{argument to '__builtin_s390_vsld' must be a constant integer}}
79 // [email protected]:* 11 {{candidate function not viable}}
80 // [email protected]:* 1 {{must be a constant integer from 0 to 7}}
81 vsi = vec_sldb(vsi, vsi, idx); // expected-error {{no matching function}} \
82 // expected-error {{argument to '__builtin_s390_vsld' must be a constant integer}}
83 // [email protected]:* 11 {{candidate function not viable}}
84 // [email protected]:* 1 {{must be a constant integer from 0 to 7}}
85 vui = vec_sldb(vui, vui, idx); // expected-error {{no matching function}} \
86 // expected-error {{argument to '__builtin_s390_vsld' must be a constant integer}}
87 // [email protected]:* 11 {{candidate function not viable}}
88 // [email protected]:* 1 {{must be a constant integer from 0 to 7}}
89 vsl = vec_sldb(vsl, vsl, idx); // expected-error {{no matching function}} \
90 // expected-error {{argument to '__builtin_s390_vsld' must be a constant integer}}
91 // [email protected]:* 11 {{candidate function not viable}}
92 // [email protected]:* 1 {{must be a constant integer from 0 to 7}}
93 vul = vec_sldb(vul, vul, idx); // expected-error {{no matching function}} \
94 // expected-error {{argument to '__builtin_s390_vsld' must be a constant integer}}
95 // [email protected]:* 11 {{candidate function not viable}}
96 // [email protected]:* 1 {{must be a constant integer from 0 to 7}}
97 vslll = vec_sldb(vslll, vslll, idx); // expected-error {{no matching function}} \
98 // expected-error {{argument to '__builtin_s390_vsld' must be a constant integer}}
99 // [email protected]:* 11 {{candidate function not viable}}
100 // [email protected]:* 1 {{must be a constant integer from 0 to 7}}
101 vulll = vec_sldb(vulll, vulll, idx); // expected-error {{no matching function}} \
102 // expected-error {{argument to '__builtin_s390_vsld' must be a constant integer}}
103 // [email protected]:* 11 {{candidate function not viable}}
104 // [email protected]:* 1 {{must be a constant integer from 0 to 7}}
105 vf = vec_sldb(vf, vf, idx); // expected-error {{no matching function}} \
106 // expected-error {{argument to '__builtin_s390_vsld' must be a constant integer}}
107 // [email protected]:* 11 {{candidate function not viable}}
108 // [email protected]:* 1 {{must be a constant integer from 0 to 7}}
109 vd = vec_sldb(vd, vd, idx); // expected-error {{no matching function}} \
110 // expected-error {{argument to '__builtin_s390_vsld' must be a constant integer}}
111 // [email protected]:* 11 {{candidate function not viable}}
112 // [email protected]:* 1 {{must be a constant integer from 0 to 7}}
113
114 vsc = vec_srdb(vsc, vsc, idx); // expected-error {{no matching function}} \
115 // expected-error {{argument to '__builtin_s390_vsrd' must be a constant integer}}
116 // [email protected]:* 11 {{candidate function not viable}}
117 // [email protected]:* 1 {{must be a constant integer from 0 to 7}}
118 vuc = vec_srdb(vuc, vuc, idx); // expected-error {{no matching function}} \
119 // expected-error {{argument to '__builtin_s390_vsrd' must be a constant integer}}
120 // [email protected]:* 11 {{candidate function not viable}}
121 // [email protected]:* 1 {{must be a constant integer from 0 to 7}}
122 vss = vec_srdb(vss, vss, idx); // expected-error {{no matching function}} \
123 // expected-error {{argument to '__builtin_s390_vsrd' must be a constant integer}}
124 // [email protected]:* 11 {{candidate function not viable}}
125 // [email protected]:* 1 {{must be a constant integer from 0 to 7}}
126 vus = vec_srdb(vus, vus, idx); // expected-error {{no matching function}} \
127 // expected-error {{argument to '__builtin_s390_vsrd' must be a constant integer}}
128 // [email protected]:* 11 {{candidate function not viable}}
129 // [email protected]:* 1 {{must be a constant integer from 0 to 7}}
130 vsi = vec_srdb(vsi, vsi, idx); // expected-error {{no matching function}} \
131 // expected-error {{argument to '__builtin_s390_vsrd' must be a constant integer}}
132 // [email protected]:* 11 {{candidate function not viable}}
133 // [email protected]:* 1 {{must be a constant integer from 0 to 7}}
134 vui = vec_srdb(vui, vui, idx); // expected-error {{no matching function}} \
135 // expected-error {{argument to '__builtin_s390_vsrd' must be a constant integer}}
136 // [email protected]:* 11 {{candidate function not viable}}
137 // [email protected]:* 1 {{must be a constant integer from 0 to 7}}
138 vsl = vec_srdb(vsl, vsl, idx); // expected-error {{no matching function}} \
139 // expected-error {{argument to '__builtin_s390_vsrd' must be a constant integer}}
140 // [email protected]:* 11 {{candidate function not viable}}
141 // [email protected]:* 1 {{must be a constant integer from 0 to 7}}
142 vul = vec_srdb(vul, vul, idx); // expected-error {{no matching function}} \
143 // expected-error {{argument to '__builtin_s390_vsrd' must be a constant integer}}
144 // [email protected]:* 11 {{candidate function not viable}}
145 // [email protected]:* 1 {{must be a constant integer from 0 to 7}}
146 vslll = vec_srdb(vslll, vslll, idx); // expected-error {{no matching function}} \
147 // expected-error {{argument to '__builtin_s390_vsrd' must be a constant integer}}
148 // [email protected]:* 11 {{candidate function not viable}}
149 // [email protected]:* 1 {{must be a constant integer from 0 to 7}}
150 vulll = vec_srdb(vulll, vulll, idx); // expected-error {{no matching function}} \
151 // expected-error {{argument to '__builtin_s390_vsrd' must be a constant integer}}
152 // [email protected]:* 11 {{candidate function not viable}}
153 // [email protected]:* 1 {{must be a constant integer from 0 to 7}}
154 vf = vec_srdb(vf, vf, idx); // expected-error {{no matching function}} \
155 // expected-error {{argument to '__builtin_s390_vsrd' must be a constant integer}}
156 // [email protected]:* 11 {{candidate function not viable}}
157 // [email protected]:* 1 {{must be a constant integer from 0 to 7}}
158 vd = vec_srdb(vd, vd, idx); // expected-error {{no matching function}} \
159 // expected-error {{argument to '__builtin_s390_vsrd' must be a constant integer}}
160 // [email protected]:* 11 {{candidate function not viable}}
161 // [email protected]:* 1 {{must be a constant integer from 0 to 7}}
162 }