| 1 |
/* { dg-options "-msve-vector-bits=256" } */ |
| 2 |
|
| 3 |
#include <arm_sve.h> |
| 4 |
|
| 5 |
typedef uint8_t gnu_uint8_t __attribute__ ((vector_size (32))); |
| 6 |
typedef int8_t gnu_int8_t __attribute__ ((vector_size (32))); |
| 7 |
|
| 8 |
void |
| 9 |
f (svuint8_t sve_u1, svint8_t sve_s1, |
| 10 |
gnu_uint8_t gnu_u1, gnu_int8_t gnu_s1, int n, unsigned char uc) |
| 11 |
{ |
| 12 |
/* Initialization. */ |
| 13 |
|
| 14 |
svuint8_t init_sve_u1 = 0; /* { dg-error {incompatible types when initializing type 'svuint8_t' using type 'int'} } */ |
| 15 |
svuint8_t init_sve_u2 = {}; |
| 16 |
svuint8_t init_sve_u3 = { sve_u1 }; /* { dg-error {incompatible types when initializing type 'unsigned char'} } */ |
| 17 |
svuint8_t init_sve_u4 = { gnu_u1 }; /* { dg-error {incompatible types when initializing type 'unsigned char'} } */ |
| 18 |
svuint8_t init_sve_u5 = { sve_s1 }; /* { dg-error {incompatible types when initializing type 'unsigned char'} } */ |
| 19 |
svuint8_t init_sve_u6 = { gnu_s1 }; /* { dg-error {incompatible types when initializing type 'unsigned char'} } */ |
| 20 |
svuint8_t init_sve_u7 = { 0 }; |
| 21 |
|
| 22 |
svuint8_t init_sve_u8 = { sve_u1, sve_u1 }; /* { dg-error {incompatible types when initializing type 'unsigned char'} } */ |
| 23 |
svuint8_t init_sve_u9 = { gnu_u1, gnu_u1 }; /* { dg-error {incompatible types when initializing type 'unsigned char'} } */ |
| 24 |
|
| 25 |
gnu_uint8_t init_gnu_u1 = 0; /* { dg-error {incompatible types when initializing type 'gnu_uint8_t'[^\n]* using type 'int'} } */ |
| 26 |
gnu_uint8_t init_gnu_u2 = {}; |
| 27 |
gnu_uint8_t init_gnu_u3 = { sve_u1 }; /* { dg-error {incompatible types when initializing type 'unsigned char'} } */ |
| 28 |
gnu_uint8_t init_gnu_u4 = { gnu_u1 }; /* { dg-error {incompatible types when initializing type 'unsigned char'} } */ |
| 29 |
gnu_uint8_t init_gnu_u5 = { sve_s1 }; /* { dg-error {incompatible types when initializing type 'unsigned char'} } */ |
| 30 |
gnu_uint8_t init_gnu_u6 = { gnu_s1 }; /* { dg-error {incompatible types when initializing type 'unsigned char'} } */ |
| 31 |
gnu_uint8_t init_gnu_u7 = { 0 }; |
| 32 |
|
| 33 |
/* Compound literals. */ |
| 34 |
|
| 35 |
(svuint8_t) {}; |
| 36 |
(svuint8_t) { 0 }; |
| 37 |
(svuint8_t) { sve_u1 }; /* { dg-error {incompatible types when initializing type 'unsigned char'} } */ |
| 38 |
(svuint8_t) { gnu_u1 }; /* { dg-error {incompatible types when initializing type 'unsigned char'} } */ |
| 39 |
(svuint8_t) { sve_s1 }; /* { dg-error {incompatible types when initializing type 'unsigned char'} } */ |
| 40 |
(svuint8_t) { gnu_s1 }; /* { dg-error {incompatible types when initializing type 'unsigned char'} } */ |
| 41 |
|
| 42 |
(gnu_uint8_t) {}; |
| 43 |
(gnu_uint8_t) { 0 }; |
| 44 |
(gnu_uint8_t) { sve_u1 }; /* { dg-error {incompatible types when initializing type 'unsigned char'} } */ |
| 45 |
(gnu_uint8_t) { gnu_u1 }; /* { dg-error {incompatible types when initializing type 'unsigned char'} } */ |
| 46 |
|
| 47 |
/* Assignment. */ |
| 48 |
|
| 49 |
sve_u1 = 0; /* { dg-error {incompatible types when assigning to type 'svuint8_t' from type 'int'} } */ |
| 50 |
sve_u1 = sve_u1; |
| 51 |
sve_u1 = gnu_u1; |
| 52 |
sve_u1 = sve_s1; /* { dg-error {incompatible types when assigning to type 'svuint8_t' from type 'svint8_t'} } */ |
| 53 |
sve_u1 = gnu_s1; /* { dg-error {incompatible types when assigning to type 'svuint8_t' from type 'gnu_int8_t'} } */ |
| 54 |
|
| 55 |
gnu_u1 = 0; /* { dg-error {incompatible types when assigning to type 'gnu_uint8_t'[^\n]* from type 'int'} } */ |
| 56 |
gnu_u1 = sve_u1; |
| 57 |
gnu_u1 = gnu_u1; |
| 58 |
gnu_u1 = sve_s1; /* { dg-error {incompatible types when assigning to type 'gnu_uint8_t'[^\n]* from type 'svint8_t'} } */ |
| 59 |
gnu_u1 = gnu_s1; /* { dg-error {incompatible types when assigning to type 'gnu_uint8_t'[^\n]* from type 'gnu_int8_t'} } */ |
| 60 |
|
| 61 |
/* Casts. */ |
| 62 |
|
| 63 |
(void) sve_u1; |
| 64 |
(svuint8_t) sve_u1; |
| 65 |
(svuint8_t) gnu_u1; |
| 66 |
(svuint8_t) 0; /* { dg-error {cannot convert a value of type 'int' to vector type '[^']*' which has different size} } */ |
| 67 |
(svuint8_t) n; /* { dg-error {cannot convert a value of type 'int' to vector type '[^']*' which has different size} } */ |
| 68 |
(svint8_t) sve_u1; |
| 69 |
(svint8_t) gnu_u1; |
| 70 |
|
| 71 |
(void) gnu_u1; |
| 72 |
(gnu_uint8_t) sve_u1; |
| 73 |
(gnu_uint8_t) gnu_u1; |
| 74 |
(gnu_uint8_t) 0; /* { dg-error {cannot convert a value of type 'int' to vector type '[^']*' which has different size} } */ |
| 75 |
(gnu_uint8_t) n; /* { dg-error {cannot convert a value of type 'int' to vector type '[^']*' which has different size} } */ |
| 76 |
(gnu_int8_t) sve_u1; |
| 77 |
(gnu_int8_t) gnu_u1; |
| 78 |
|
| 79 |
/* Vector indexing. */ |
| 80 |
|
| 81 |
sve_u1[0]; |
| 82 |
&sve_u1[0]; |
| 83 |
|
| 84 |
gnu_u1[0]; |
| 85 |
&gnu_u1[0]; |
| 86 |
|
| 87 |
/* Unary operators. */ |
| 88 |
|
| 89 |
+sve_u1; |
| 90 |
-sve_u1; |
| 91 |
~sve_u1; |
| 92 |
!sve_u1; /* { dg-error {wrong type argument to unary exclamation mark} } */ |
| 93 |
*sve_u1; /* { dg-error {invalid type argument of unary '\*'} } */ |
| 94 |
__real sve_u1; /* { dg-error {wrong type argument to __real} } */ |
| 95 |
__imag sve_u1; /* { dg-error {wrong type argument to __imag} } */ |
| 96 |
++sve_u1; |
| 97 |
--sve_u1; |
| 98 |
sve_u1++; |
| 99 |
sve_u1--; |
| 100 |
|
| 101 |
+gnu_u1; |
| 102 |
-gnu_u1; |
| 103 |
~gnu_u1; |
| 104 |
!gnu_u1; /* { dg-error {wrong type argument to unary exclamation mark} } */ |
| 105 |
*gnu_u1; /* { dg-error {invalid type argument of unary '\*'} } */ |
| 106 |
__real gnu_u1; /* { dg-error {wrong type argument to __real} } */ |
| 107 |
__imag gnu_u1; /* { dg-error {wrong type argument to __imag} } */ |
| 108 |
++gnu_u1; |
| 109 |
--gnu_u1; |
| 110 |
gnu_u1++; |
| 111 |
gnu_u1--; |
| 112 |
|
| 113 |
/* Vector-vector binary arithmetic. */ |
| 114 |
|
| 115 |
sve_u1 + sve_u1; |
| 116 |
sve_u1 - sve_u1; |
| 117 |
sve_u1 * sve_u1; |
| 118 |
sve_u1 / sve_u1; |
| 119 |
sve_u1 % sve_u1; |
| 120 |
sve_u1 & sve_u1; |
| 121 |
sve_u1 | sve_u1; |
| 122 |
sve_u1 ^ sve_u1; |
| 123 |
sve_u1 == sve_u1; |
| 124 |
sve_u1 != sve_u1; |
| 125 |
sve_u1 <= sve_u1; |
| 126 |
sve_u1 < sve_u1; |
| 127 |
sve_u1 > sve_u1; |
| 128 |
sve_u1 >= sve_u1; |
| 129 |
sve_u1 << sve_u1; |
| 130 |
sve_u1 >> sve_u1; |
| 131 |
sve_u1 && sve_u1; /* { dg-error {used vector type where scalar is required} } */ |
| 132 |
sve_u1 || sve_u1; /* { dg-error {used vector type where scalar is required} } */ |
| 133 |
|
| 134 |
sve_u1 + gnu_u1; /* { dg-error {cannot combine GNU and SVE vectors in a binary operation} } */ |
| 135 |
sve_u1 - gnu_u1; /* { dg-error {cannot combine GNU and SVE vectors in a binary operation} } */ |
| 136 |
sve_u1 * gnu_u1; /* { dg-error {cannot combine GNU and SVE vectors in a binary operation} } */ |
| 137 |
sve_u1 / gnu_u1; /* { dg-error {cannot combine GNU and SVE vectors in a binary operation} } */ |
| 138 |
sve_u1 % gnu_u1; /* { dg-error {cannot combine GNU and SVE vectors in a binary operation} } */ |
| 139 |
sve_u1 & gnu_u1; /* { dg-error {cannot combine GNU and SVE vectors in a binary operation} } */ |
| 140 |
sve_u1 | gnu_u1; /* { dg-error {cannot combine GNU and SVE vectors in a binary operation} } */ |
| 141 |
sve_u1 ^ gnu_u1; /* { dg-error {cannot combine GNU and SVE vectors in a binary operation} } */ |
| 142 |
sve_u1 == gnu_u1; /* { dg-error {cannot combine GNU and SVE vectors in a binary operation} } */ |
| 143 |
sve_u1 != gnu_u1; /* { dg-error {cannot combine GNU and SVE vectors in a binary operation} } */ |
| 144 |
sve_u1 <= gnu_u1; /* { dg-error {cannot combine GNU and SVE vectors in a binary operation} } */ |
| 145 |
sve_u1 < gnu_u1; /* { dg-error {cannot combine GNU and SVE vectors in a binary operation} } */ |
| 146 |
sve_u1 > gnu_u1; /* { dg-error {cannot combine GNU and SVE vectors in a binary operation} } */ |
| 147 |
sve_u1 >= gnu_u1; /* { dg-error {cannot combine GNU and SVE vectors in a binary operation} } */ |
| 148 |
sve_u1 << gnu_u1; /* { dg-error {cannot combine GNU and SVE vectors in a binary operation} } */ |
| 149 |
sve_u1 >> gnu_u1; /* { dg-error {cannot combine GNU and SVE vectors in a binary operation} } */ |
| 150 |
sve_u1 && gnu_u1; /* { dg-error {used vector type where scalar is required} } */ |
| 151 |
sve_u1 || gnu_u1; /* { dg-error {used vector type where scalar is required} } */ |
| 152 |
|
| 153 |
gnu_u1 + sve_u1; /* { dg-error {cannot combine GNU and SVE vectors in a binary operation} } */ |
| 154 |
gnu_u1 - sve_u1; /* { dg-error {cannot combine GNU and SVE vectors in a binary operation} } */ |
| 155 |
gnu_u1 * sve_u1; /* { dg-error {cannot combine GNU and SVE vectors in a binary operation} } */ |
| 156 |
gnu_u1 / sve_u1; /* { dg-error {cannot combine GNU and SVE vectors in a binary operation} } */ |
| 157 |
gnu_u1 % sve_u1; /* { dg-error {cannot combine GNU and SVE vectors in a binary operation} } */ |
| 158 |
gnu_u1 & sve_u1; /* { dg-error {cannot combine GNU and SVE vectors in a binary operation} } */ |
| 159 |
gnu_u1 | sve_u1; /* { dg-error {cannot combine GNU and SVE vectors in a binary operation} } */ |
| 160 |
gnu_u1 ^ sve_u1; /* { dg-error {cannot combine GNU and SVE vectors in a binary operation} } */ |
| 161 |
gnu_u1 == sve_u1; /* { dg-error {cannot combine GNU and SVE vectors in a binary operation} } */ |
| 162 |
gnu_u1 != sve_u1; /* { dg-error {cannot combine GNU and SVE vectors in a binary operation} } */ |
| 163 |
gnu_u1 <= sve_u1; /* { dg-error {cannot combine GNU and SVE vectors in a binary operation} } */ |
| 164 |
gnu_u1 < sve_u1; /* { dg-error {cannot combine GNU and SVE vectors in a binary operation} } */ |
| 165 |
gnu_u1 > sve_u1; /* { dg-error {cannot combine GNU and SVE vectors in a binary operation} } */ |
| 166 |
gnu_u1 >= sve_u1; /* { dg-error {cannot combine GNU and SVE vectors in a binary operation} } */ |
| 167 |
gnu_u1 << sve_u1; /* { dg-error {cannot combine GNU and SVE vectors in a binary operation} } */ |
| 168 |
gnu_u1 >> sve_u1; /* { dg-error {cannot combine GNU and SVE vectors in a binary operation} } */ |
| 169 |
gnu_u1 && sve_u1; /* { dg-error {used vector type where scalar is required} } */ |
| 170 |
gnu_u1 || sve_u1; /* { dg-error {used vector type where scalar is required} } */ |
| 171 |
|
| 172 |
gnu_u1 + gnu_u1; |
| 173 |
gnu_u1 - gnu_u1; |
| 174 |
gnu_u1 * gnu_u1; |
| 175 |
gnu_u1 / gnu_u1; |
| 176 |
gnu_u1 % gnu_u1; |
| 177 |
gnu_u1 & gnu_u1; |
| 178 |
gnu_u1 | gnu_u1; |
| 179 |
gnu_u1 ^ gnu_u1; |
| 180 |
gnu_u1 == gnu_u1; |
| 181 |
gnu_u1 != gnu_u1; |
| 182 |
gnu_u1 <= gnu_u1; |
| 183 |
gnu_u1 < gnu_u1; |
| 184 |
gnu_u1 > gnu_u1; |
| 185 |
gnu_u1 >= gnu_u1; |
| 186 |
gnu_u1 << gnu_u1; |
| 187 |
gnu_u1 >> gnu_u1; |
| 188 |
gnu_u1 && gnu_u1; /* { dg-error {used vector type where scalar is required} } */ |
| 189 |
gnu_u1 || gnu_u1; /* { dg-error {used vector type where scalar is required} } */ |
| 190 |
|
| 191 |
/* Vector-scalar binary arithmetic. */ |
| 192 |
|
| 193 |
sve_u1 + 2; |
| 194 |
sve_u1 - 2; |
| 195 |
sve_u1 * 2; |
| 196 |
sve_u1 / 2; |
| 197 |
sve_u1 % 2; |
| 198 |
sve_u1 & 2; |
| 199 |
sve_u1 | 2; |
| 200 |
sve_u1 ^ 2; |
| 201 |
sve_u1 == 2; |
| 202 |
sve_u1 != 2; |
| 203 |
sve_u1 <= 2; |
| 204 |
sve_u1 < 2; |
| 205 |
sve_u1 > 2; |
| 206 |
sve_u1 >= 2; |
| 207 |
sve_u1 << 2; |
| 208 |
sve_u1 >> 2; |
| 209 |
sve_u1 && 2; /* { dg-error {used vector type where scalar is required} } */ |
| 210 |
sve_u1 || 2; /* { dg-error {used vector type where scalar is required} } */ |
| 211 |
|
| 212 |
sve_u1 + uc; |
| 213 |
sve_u1 - uc; |
| 214 |
sve_u1 * uc; |
| 215 |
sve_u1 / uc; |
| 216 |
sve_u1 % uc; |
| 217 |
sve_u1 & uc; |
| 218 |
sve_u1 | uc; |
| 219 |
sve_u1 ^ uc; |
| 220 |
sve_u1 == uc; |
| 221 |
sve_u1 != uc; |
| 222 |
sve_u1 <= uc; |
| 223 |
sve_u1 < uc; |
| 224 |
sve_u1 > uc; |
| 225 |
sve_u1 >= uc; |
| 226 |
sve_u1 << uc; |
| 227 |
sve_u1 >> uc; |
| 228 |
sve_u1 && uc; /* { dg-error {used vector type where scalar is required} } */ |
| 229 |
sve_u1 || uc; /* { dg-error {used vector type where scalar is required} } */ |
| 230 |
|
| 231 |
gnu_u1 + 2; |
| 232 |
gnu_u1 - 2; |
| 233 |
gnu_u1 * 2; |
| 234 |
gnu_u1 / 2; |
| 235 |
gnu_u1 % 2; |
| 236 |
gnu_u1 & 2; |
| 237 |
gnu_u1 | 2; |
| 238 |
gnu_u1 ^ 2; |
| 239 |
gnu_u1 == 2; |
| 240 |
gnu_u1 != 2; |
| 241 |
gnu_u1 <= 2; |
| 242 |
gnu_u1 < 2; |
| 243 |
gnu_u1 > 2; |
| 244 |
gnu_u1 >= 2; |
| 245 |
gnu_u1 << 2; |
| 246 |
gnu_u1 >> 2; |
| 247 |
gnu_u1 && 2; /* { dg-error {used vector type where scalar is required} } */ |
| 248 |
gnu_u1 || 2; /* { dg-error {used vector type where scalar is required} } */ |
| 249 |
|
| 250 |
gnu_u1 + uc; |
| 251 |
gnu_u1 - uc; |
| 252 |
gnu_u1 * uc; |
| 253 |
gnu_u1 / uc; |
| 254 |
gnu_u1 % uc; |
| 255 |
gnu_u1 & uc; |
| 256 |
gnu_u1 | uc; |
| 257 |
gnu_u1 ^ uc; |
| 258 |
gnu_u1 == uc; |
| 259 |
gnu_u1 != uc; |
| 260 |
gnu_u1 <= uc; |
| 261 |
gnu_u1 < uc; |
| 262 |
gnu_u1 > uc; |
| 263 |
gnu_u1 >= uc; |
| 264 |
gnu_u1 << uc; |
| 265 |
gnu_u1 >> uc; |
| 266 |
gnu_u1 && uc; /* { dg-error {used vector type where scalar is required} } */ |
| 267 |
gnu_u1 || uc; /* { dg-error {used vector type where scalar is required} } */ |
| 268 |
|
| 269 |
/* Scalar-vector binary arithmetic. */ |
| 270 |
|
| 271 |
3 + sve_u1; |
| 272 |
3 - sve_u1; |
| 273 |
3 * sve_u1; |
| 274 |
3 / sve_u1; |
| 275 |
3 % sve_u1; |
| 276 |
3 & sve_u1; |
| 277 |
3 | sve_u1; |
| 278 |
3 ^ sve_u1; |
| 279 |
3 == sve_u1; |
| 280 |
3 != sve_u1; |
| 281 |
3 <= sve_u1; |
| 282 |
3 < sve_u1; |
| 283 |
3 > sve_u1; |
| 284 |
3 >= sve_u1; |
| 285 |
3 << sve_u1; |
| 286 |
3 >> sve_u1; |
| 287 |
3 && sve_u1; /* { dg-error {invalid operands to binary \&\&} } */ |
| 288 |
3 || sve_u1; /* { dg-error {invalid operands to binary \|\|} } */ |
| 289 |
|
| 290 |
3 + gnu_u1; |
| 291 |
3 - gnu_u1; |
| 292 |
3 * gnu_u1; |
| 293 |
3 / gnu_u1; |
| 294 |
3 % gnu_u1; |
| 295 |
3 & gnu_u1; |
| 296 |
3 | gnu_u1; |
| 297 |
3 ^ gnu_u1; |
| 298 |
3 == gnu_u1; |
| 299 |
3 != gnu_u1; |
| 300 |
3 <= gnu_u1; |
| 301 |
3 < gnu_u1; |
| 302 |
3 > gnu_u1; |
| 303 |
3 >= gnu_u1; |
| 304 |
3 << gnu_u1; |
| 305 |
3 >> gnu_u1; |
| 306 |
3 && gnu_u1; /* { dg-error {invalid operands to binary \&\&} } */ |
| 307 |
3 || gnu_u1; /* { dg-error {invalid operands to binary \|\|} } */ |
| 308 |
|
| 309 |
/* Mismatched types. */ |
| 310 |
|
| 311 |
sve_u1 + sve_s1; |
| 312 |
sve_u1 - sve_s1; |
| 313 |
sve_u1 * sve_s1; |
| 314 |
sve_u1 / sve_s1; |
| 315 |
sve_u1 % sve_s1; |
| 316 |
sve_u1 & sve_s1; |
| 317 |
sve_u1 | sve_s1; |
| 318 |
sve_u1 ^ sve_s1; |
| 319 |
sve_u1 == sve_s1; |
| 320 |
sve_u1 != sve_s1; |
| 321 |
sve_u1 <= sve_s1; |
| 322 |
sve_u1 < sve_s1; |
| 323 |
sve_u1 > sve_s1; |
| 324 |
sve_u1 >= sve_s1; |
| 325 |
sve_u1 << sve_s1; |
| 326 |
sve_u1 >> sve_s1; |
| 327 |
sve_u1 && sve_s1; /* { dg-error {used vector type where scalar is required} } */ |
| 328 |
sve_u1 || sve_s1; /* { dg-error {used vector type where scalar is required} } */ |
| 329 |
|
| 330 |
sve_u1 + gnu_s1; /* { dg-error {cannot combine GNU and SVE vectors in a binary operation} } */ |
| 331 |
sve_u1 - gnu_s1; /* { dg-error {cannot combine GNU and SVE vectors in a binary operation} } */ |
| 332 |
sve_u1 * gnu_s1; /* { dg-error {cannot combine GNU and SVE vectors in a binary operation} } */ |
| 333 |
sve_u1 / gnu_s1; /* { dg-error {cannot combine GNU and SVE vectors in a binary operation} } */ |
| 334 |
sve_u1 % gnu_s1; /* { dg-error {cannot combine GNU and SVE vectors in a binary operation} } */ |
| 335 |
sve_u1 & gnu_s1; /* { dg-error {cannot combine GNU and SVE vectors in a binary operation} } */ |
| 336 |
sve_u1 | gnu_s1; /* { dg-error {cannot combine GNU and SVE vectors in a binary operation} } */ |
| 337 |
sve_u1 ^ gnu_s1; /* { dg-error {cannot combine GNU and SVE vectors in a binary operation} } */ |
| 338 |
sve_u1 == gnu_s1; /* { dg-error {cannot combine GNU and SVE vectors in a binary operation} } */ |
| 339 |
sve_u1 != gnu_s1; /* { dg-error {cannot combine GNU and SVE vectors in a binary operation} } */ |
| 340 |
sve_u1 <= gnu_s1; /* { dg-error {cannot combine GNU and SVE vectors in a binary operation} } */ |
| 341 |
sve_u1 < gnu_s1; /* { dg-error {cannot combine GNU and SVE vectors in a binary operation} } */ |
| 342 |
sve_u1 > gnu_s1; /* { dg-error {cannot combine GNU and SVE vectors in a binary operation} } */ |
| 343 |
sve_u1 >= gnu_s1; /* { dg-error {cannot combine GNU and SVE vectors in a binary operation} } */ |
| 344 |
sve_u1 << gnu_s1; /* { dg-error {cannot combine GNU and SVE vectors in a binary operation} } */ |
| 345 |
sve_u1 >> gnu_s1; /* { dg-error {cannot combine GNU and SVE vectors in a binary operation} } */ |
| 346 |
sve_u1 && gnu_s1; /* { dg-error {used vector type where scalar is required} } */ |
| 347 |
sve_u1 || gnu_s1; /* { dg-error {used vector type where scalar is required} } */ |
| 348 |
|
| 349 |
gnu_u1 + sve_s1; /* { dg-error {cannot combine GNU and SVE vectors in a binary operation} } */ |
| 350 |
gnu_u1 - sve_s1; /* { dg-error {cannot combine GNU and SVE vectors in a binary operation} } */ |
| 351 |
gnu_u1 * sve_s1; /* { dg-error {cannot combine GNU and SVE vectors in a binary operation} } */ |
| 352 |
gnu_u1 / sve_s1; /* { dg-error {cannot combine GNU and SVE vectors in a binary operation} } */ |
| 353 |
gnu_u1 % sve_s1; /* { dg-error {cannot combine GNU and SVE vectors in a binary operation} } */ |
| 354 |
gnu_u1 & sve_s1; /* { dg-error {cannot combine GNU and SVE vectors in a binary operation} } */ |
| 355 |
gnu_u1 | sve_s1; /* { dg-error {cannot combine GNU and SVE vectors in a binary operation} } */ |
| 356 |
gnu_u1 ^ sve_s1; /* { dg-error {cannot combine GNU and SVE vectors in a binary operation} } */ |
| 357 |
gnu_u1 == sve_s1; /* { dg-error {cannot combine GNU and SVE vectors in a binary operation} } */ |
| 358 |
gnu_u1 != sve_s1; /* { dg-error {cannot combine GNU and SVE vectors in a binary operation} } */ |
| 359 |
gnu_u1 <= sve_s1; /* { dg-error {cannot combine GNU and SVE vectors in a binary operation} } */ |
| 360 |
gnu_u1 < sve_s1; /* { dg-error {cannot combine GNU and SVE vectors in a binary operation} } */ |
| 361 |
gnu_u1 > sve_s1; /* { dg-error {cannot combine GNU and SVE vectors in a binary operation} } */ |
| 362 |
gnu_u1 >= sve_s1; /* { dg-error {cannot combine GNU and SVE vectors in a binary operation} } */ |
| 363 |
gnu_u1 << sve_s1; /* { dg-error {cannot combine GNU and SVE vectors in a binary operation} } */ |
| 364 |
gnu_u1 >> sve_s1; /* { dg-error {cannot combine GNU and SVE vectors in a binary operation} } */ |
| 365 |
gnu_u1 && sve_s1; /* { dg-error {used vector type where scalar is required} } */ |
| 366 |
gnu_u1 || sve_s1; /* { dg-error {used vector type where scalar is required} } */ |
| 367 |
|
| 368 |
gnu_u1 + gnu_s1; |
| 369 |
gnu_u1 - gnu_s1; |
| 370 |
gnu_u1 * gnu_s1; |
| 371 |
gnu_u1 / gnu_s1; |
| 372 |
gnu_u1 % gnu_s1; |
| 373 |
gnu_u1 & gnu_s1; |
| 374 |
gnu_u1 | gnu_s1; |
| 375 |
gnu_u1 ^ gnu_s1; |
| 376 |
gnu_u1 == gnu_s1; |
| 377 |
gnu_u1 != gnu_s1; |
| 378 |
gnu_u1 <= gnu_s1; |
| 379 |
gnu_u1 < gnu_s1; |
| 380 |
gnu_u1 > gnu_s1; |
| 381 |
gnu_u1 >= gnu_s1; |
| 382 |
gnu_u1 << gnu_s1; |
| 383 |
gnu_u1 >> gnu_s1; |
| 384 |
gnu_u1 && gnu_s1; /* { dg-error {used vector type where scalar is required} } */ |
| 385 |
gnu_u1 || gnu_s1; /* { dg-error {used vector type where scalar is required} } */ |
| 386 |
|
| 387 |
/* Conditional expressions. */ |
| 388 |
|
| 389 |
uc ? sve_u1 : sve_u1; |
| 390 |
uc ? gnu_u1 : sve_u1; /* { dg-error {type mismatch in conditional expression} } */ |
| 391 |
uc ? sve_u1 : gnu_u1; /* { dg-error {type mismatch in conditional expression} } */ |
| 392 |
uc ? gnu_u1 : gnu_u1; |
| 393 |
|
| 394 |
sve_u1 ? sve_u1 : sve_u1; /* { dg-error {used vector type where scalar is required} } */ |
| 395 |
sve_u1 ? gnu_u1 : sve_u1; /* { dg-error {used vector type where scalar is required} } */ |
| 396 |
sve_u1 ? sve_u1 : gnu_u1; /* { dg-error {used vector type where scalar is required} } */ |
| 397 |
sve_u1 ? gnu_u1 : gnu_u1; /* { dg-error {used vector type where scalar is required} } */ |
| 398 |
|
| 399 |
gnu_u1 ? sve_u1 : sve_u1; /* { dg-error {used vector type where scalar is required} } */ |
| 400 |
gnu_u1 ? gnu_u1 : sve_u1; /* { dg-error {used vector type where scalar is required} } */ |
| 401 |
gnu_u1 ? sve_u1 : gnu_u1; /* { dg-error {used vector type where scalar is required} } */ |
| 402 |
gnu_u1 ? gnu_u1 : gnu_u1; /* { dg-error {used vector type where scalar is required} } */ |
| 403 |
|
| 404 |
/* Vector built-ins. */ |
| 405 |
|
| 406 |
__builtin_shuffle (sve_u1, sve_u1, sve_u1); |
| 407 |
__builtin_shuffle (sve_u1, gnu_u1, gnu_u1); /* { dg-error {'__builtin_shuffle' argument vectors must be of the same type} } */ |
| 408 |
__builtin_shuffle (gnu_u1, sve_u1, gnu_u1); /* { dg-error {'__builtin_shuffle' argument vectors must be of the same type} } */ |
| 409 |
__builtin_shuffle (gnu_u1, gnu_u1, sve_u1); |
| 410 |
__builtin_shuffle (gnu_u1, gnu_u1, gnu_u1); |
| 411 |
|
| 412 |
__builtin_convertvector (sve_u1, svuint8_t); |
| 413 |
__builtin_convertvector (gnu_u1, svuint8_t); |
| 414 |
__builtin_convertvector (sve_u1, gnu_uint8_t); |
| 415 |
__builtin_convertvector (gnu_u1, gnu_uint8_t); |
| 416 |
} |