| 1 |
// RUN: %clang_cc1 -triple s390x-linux-gnu -fzvector \ |
| 2 |
// RUN: -flax-vector-conversions=none -W -Wall -Wconversion \ |
| 3 |
// RUN: -Werror -fsyntax-only -verify %s |
| 4 |
|
| 5 |
vector signed char sc, sc2; |
| 6 |
vector unsigned char uc, uc2; |
| 7 |
vector bool char bc, bc2; |
| 8 |
|
| 9 |
vector signed short ss, ss2; |
| 10 |
vector unsigned short us, us2; |
| 11 |
vector bool short bs, bs2; |
| 12 |
|
| 13 |
vector signed int si, si2; |
| 14 |
vector unsigned int ui, ui2; |
| 15 |
vector bool int bi, bi2; |
| 16 |
|
| 17 |
vector signed long long sl, sl2; |
| 18 |
vector unsigned long long ul, ul2; |
| 19 |
vector bool long long bl, bl2; |
| 20 |
|
| 21 |
vector double fd, fd2; |
| 22 |
|
| 23 |
vector long ll; // expected-error {{cannot use 'long' with '__vector'}} |
| 24 |
vector float ff; // expected-error {{cannot use 'float' with '__vector'}} |
| 25 |
vector long double ld; // expected-error {{cannot use 'long double' with '__vector'}} |
| 26 |
vector float _Complex cf; // expected-error {{cannot use '_Complex' with '__vector'}} |
| 27 |
vector double _Complex cd; // expected-error {{cannot use '_Complex' with '__vector'}} |
| 28 |
vector long double _Complex cld; // expected-error {{cannot use '_Complex' with '__vector'}} |
| 29 |
|
| 30 |
signed char sc_scalar; |
| 31 |
unsigned char uc_scalar; |
| 32 |
|
| 33 |
signed short ss_scalar; |
| 34 |
unsigned short us_scalar; |
| 35 |
|
| 36 |
signed int si_scalar; |
| 37 |
unsigned int ui_scalar; |
| 38 |
|
| 39 |
signed long sl_scalar; |
| 40 |
unsigned long ul_scalar; |
| 41 |
|
| 42 |
double fd_scalar; |
| 43 |
|
| 44 |
// Verify that __vector is also recognized |
| 45 |
__vector signed char sc3; |
| 46 |
__vector unsigned char uc3; |
| 47 |
__vector bool char bc3; |
| 48 |
__vector signed short ss3; |
| 49 |
__vector unsigned short us3; |
| 50 |
__vector bool short bs3; |
| 51 |
__vector signed int si3; |
| 52 |
__vector unsigned int ui3; |
| 53 |
__vector bool int bi3; |
| 54 |
__vector signed long long sl3; |
| 55 |
__vector unsigned long long ul3; |
| 56 |
__vector bool long long bl3; |
| 57 |
__vector double fd3; |
| 58 |
__vector long ll3; // expected-error {{cannot use 'long' with '__vector'}} |
| 59 |
__vector float ff3; // expected-error {{cannot use 'float' with '__vector'}} |
| 60 |
__vector long double ld3; // expected-error {{cannot use 'long double' with '__vector'}} |
| 61 |
__vector float _Complex cf3; // expected-error {{cannot use '_Complex' with '__vector'}} |
| 62 |
__vector double _Complex cd3; // expected-error {{cannot use '_Complex' with '__vector'}} |
| 63 |
__vector long double _Complex cld3; // expected-error {{cannot use '_Complex' with '__vector'}} |
| 64 |
|
| 65 |
// Likewise for __bool |
| 66 |
vector __bool char bc4; |
| 67 |
vector __bool short bs4; |
| 68 |
vector __bool int bi4; |
| 69 |
vector __bool long long bl4; |
| 70 |
__vector __bool char bc5; |
| 71 |
__vector __bool short bs5; |
| 72 |
__vector __bool int bi5; |
| 73 |
__vector __bool long long bl5; |
| 74 |
|
| 75 |
// Verify operation of vec_step |
| 76 |
int res_sc[vec_step(sc) == 16 ? 1 : -1]; |
| 77 |
int res_uc[vec_step(uc) == 16 ? 1 : -1]; |
| 78 |
int res_bc[vec_step(bc) == 16 ? 1 : -1]; |
| 79 |
int res_ss[vec_step(ss) == 8 ? 1 : -1]; |
| 80 |
int res_us[vec_step(us) == 8 ? 1 : -1]; |
| 81 |
int res_bs[vec_step(bs) == 8 ? 1 : -1]; |
| 82 |
int res_si[vec_step(si) == 4 ? 1 : -1]; |
| 83 |
int res_ui[vec_step(ui) == 4 ? 1 : -1]; |
| 84 |
int res_bi[vec_step(bi) == 4 ? 1 : -1]; |
| 85 |
int res_sl[vec_step(sl) == 2 ? 1 : -1]; |
| 86 |
int res_ul[vec_step(ul) == 2 ? 1 : -1]; |
| 87 |
int res_bl[vec_step(bl) == 2 ? 1 : -1]; |
| 88 |
int res_fd[vec_step(fd) == 2 ? 1 : -1]; |
| 89 |
|
| 90 |
|
| 91 |
void foo(void) |
| 92 |
{ |
| 93 |
// ------------------------------------------------------------------------- |
| 94 |
// Test assignment. |
| 95 |
// ------------------------------------------------------------------------- |
| 96 |
|
| 97 |
sc = sc2; |
| 98 |
uc = uc2; |
| 99 |
bc = bc2; |
| 100 |
|
| 101 |
ss = ss2; |
| 102 |
us = us2; |
| 103 |
bs = bs2; |
| 104 |
|
| 105 |
si = si2; |
| 106 |
ui = ui2; |
| 107 |
bi = bi2; |
| 108 |
|
| 109 |
sl = sl2; |
| 110 |
ul = ul2; |
| 111 |
bl = bl2; |
| 112 |
fd = fd2; |
| 113 |
|
| 114 |
sc = uc2; // expected-error {{incompatible type}} |
| 115 |
sc = bc2; // expected-error {{incompatible type}} |
| 116 |
uc = sc2; // expected-error {{incompatible type}} |
| 117 |
uc = bc2; // expected-error {{incompatible type}} |
| 118 |
bc = sc2; // expected-error {{incompatible type}} |
| 119 |
bc = uc2; // expected-error {{incompatible type}} |
| 120 |
|
| 121 |
sc = sc_scalar; // expected-error {{incompatible type}} |
| 122 |
sc = uc_scalar; // expected-error {{incompatible type}} |
| 123 |
uc = sc_scalar; // expected-error {{incompatible type}} |
| 124 |
uc = uc_scalar; // expected-error {{incompatible type}} |
| 125 |
bc = sc_scalar; // expected-error {{incompatible type}} |
| 126 |
bc = uc_scalar; // expected-error {{incompatible type}} |
| 127 |
|
| 128 |
sc = ss2; // expected-error {{incompatible type}} |
| 129 |
sc = si2; // expected-error {{incompatible type}} |
| 130 |
sc = sl2; // expected-error {{incompatible type}} |
| 131 |
sc = fd2; // expected-error {{incompatible type}} |
| 132 |
|
| 133 |
ss = sc2; // expected-error {{incompatible type}} |
| 134 |
si = sc2; // expected-error {{incompatible type}} |
| 135 |
sl = sc2; // expected-error {{incompatible type}} |
| 136 |
fd = sc2; // expected-error {{incompatible type}} |
| 137 |
|
| 138 |
uc = us2; // expected-error {{incompatible type}} |
| 139 |
uc = ui2; // expected-error {{incompatible type}} |
| 140 |
uc = ul2; // expected-error {{incompatible type}} |
| 141 |
uc = fd2; // expected-error {{incompatible type}} |
| 142 |
|
| 143 |
us = uc2; // expected-error {{incompatible type}} |
| 144 |
ui = uc2; // expected-error {{incompatible type}} |
| 145 |
ul = uc2; // expected-error {{incompatible type}} |
| 146 |
fd = uc2; // expected-error {{incompatible type}} |
| 147 |
|
| 148 |
bc = us2; // expected-error {{incompatible type}} |
| 149 |
bc = ui2; // expected-error {{incompatible type}} |
| 150 |
bc = ul2; // expected-error {{incompatible type}} |
| 151 |
bc = fd2; // expected-error {{incompatible type}} |
| 152 |
|
| 153 |
bs = bc2; // expected-error {{incompatible type}} |
| 154 |
bi = bc2; // expected-error {{incompatible type}} |
| 155 |
bl = bc2; // expected-error {{incompatible type}} |
| 156 |
fd = bc2; // expected-error {{incompatible type}} |
| 157 |
|
| 158 |
// ------------------------------------------------------------------------- |
| 159 |
// Test casts to same element width. |
| 160 |
// ------------------------------------------------------------------------- |
| 161 |
|
| 162 |
sc = (vector signed char)bc2; |
| 163 |
bc = (vector bool char)uc2; |
| 164 |
uc = (vector unsigned char)sc2; |
| 165 |
|
| 166 |
ss = (vector signed short)bs2; |
| 167 |
bs = (vector bool short)us2; |
| 168 |
us = (vector unsigned short)ss2; |
| 169 |
|
| 170 |
si = (vector signed int)bi2; |
| 171 |
bi = (vector bool int)ui2; |
| 172 |
ui = (vector unsigned int)si2; |
| 173 |
|
| 174 |
sl = (vector signed long long)bl2; |
| 175 |
bl = (vector bool long long)ul2; |
| 176 |
ul = (vector unsigned long long)fd2; |
| 177 |
fd = (vector double)sl2; |
| 178 |
|
| 179 |
// ------------------------------------------------------------------------- |
| 180 |
// Test casts to different element width. |
| 181 |
// ------------------------------------------------------------------------- |
| 182 |
|
| 183 |
sc = (vector signed char)bs2; |
| 184 |
bc = (vector bool char)us2; |
| 185 |
uc = (vector unsigned char)fd2; |
| 186 |
|
| 187 |
ss = (vector signed short)bi2; |
| 188 |
bs = (vector bool short)ui2; |
| 189 |
us = (vector unsigned short)fd2; |
| 190 |
|
| 191 |
si = (vector signed int)bl2; |
| 192 |
bi = (vector bool int)ul2; |
| 193 |
ui = (vector unsigned int)fd2; |
| 194 |
|
| 195 |
sl = (vector signed long long)bc2; |
| 196 |
bl = (vector bool long long)uc2; |
| 197 |
ul = (vector unsigned long long)sc2; |
| 198 |
fd = (vector double)sc2; |
| 199 |
|
| 200 |
// ------------------------------------------------------------------------- |
| 201 |
// Test ++. |
| 202 |
// ------------------------------------------------------------------------- |
| 203 |
|
| 204 |
++sc2; |
| 205 |
++uc2; |
| 206 |
++bc2; // expected-error {{cannot increment}} |
| 207 |
|
| 208 |
++ss2; |
| 209 |
++us2; |
| 210 |
++bs2; // expected-error {{cannot increment}} |
| 211 |
|
| 212 |
++si2; |
| 213 |
++ui2; |
| 214 |
++bi2; // expected-error {{cannot increment}} |
| 215 |
|
| 216 |
++sl2; |
| 217 |
++ul2; |
| 218 |
++bl2; // expected-error {{cannot increment}} |
| 219 |
|
| 220 |
++fd2; |
| 221 |
|
| 222 |
sc++; |
| 223 |
uc++; |
| 224 |
bc++; // expected-error {{cannot increment}} |
| 225 |
|
| 226 |
ss++; |
| 227 |
us++; |
| 228 |
bs++; // expected-error {{cannot increment}} |
| 229 |
|
| 230 |
si++; |
| 231 |
ui++; |
| 232 |
bi++; // expected-error {{cannot increment}} |
| 233 |
|
| 234 |
sl++; |
| 235 |
ul++; |
| 236 |
bl++; // expected-error {{cannot increment}} |
| 237 |
|
| 238 |
fd++; |
| 239 |
|
| 240 |
// ------------------------------------------------------------------------- |
| 241 |
// Test --. |
| 242 |
// ------------------------------------------------------------------------- |
| 243 |
|
| 244 |
--sc2; |
| 245 |
--uc2; |
| 246 |
--bc2; // expected-error {{cannot decrement}} |
| 247 |
|
| 248 |
--ss2; |
| 249 |
--us2; |
| 250 |
--bs2; // expected-error {{cannot decrement}} |
| 251 |
|
| 252 |
--si2; |
| 253 |
--ui2; |
| 254 |
--bi2; // expected-error {{cannot decrement}} |
| 255 |
|
| 256 |
--sl2; |
| 257 |
--ul2; |
| 258 |
--bl2; // expected-error {{cannot decrement}} |
| 259 |
|
| 260 |
--fd2; |
| 261 |
|
| 262 |
sc--; |
| 263 |
uc--; |
| 264 |
bc--; // expected-error {{cannot decrement}} |
| 265 |
|
| 266 |
ss--; |
| 267 |
us--; |
| 268 |
bs--; // expected-error {{cannot decrement}} |
| 269 |
|
| 270 |
si--; |
| 271 |
ui--; |
| 272 |
bi--; // expected-error {{cannot decrement}} |
| 273 |
|
| 274 |
sl--; |
| 275 |
ul--; |
| 276 |
bl--; // expected-error {{cannot decrement}} |
| 277 |
|
| 278 |
fd--; |
| 279 |
|
| 280 |
// ------------------------------------------------------------------------- |
| 281 |
// Test unary +. |
| 282 |
// ------------------------------------------------------------------------- |
| 283 |
|
| 284 |
sc = +sc2; |
| 285 |
uc = +uc2; |
| 286 |
bc = +bc2; // expected-error {{invalid argument type}} |
| 287 |
|
| 288 |
ss = +ss2; |
| 289 |
us = +us2; |
| 290 |
bs = +bs2; // expected-error {{invalid argument type}} |
| 291 |
|
| 292 |
si = +si2; |
| 293 |
ui = +ui2; |
| 294 |
bi = +bi2; // expected-error {{invalid argument type}} |
| 295 |
|
| 296 |
sl = +sl2; |
| 297 |
ul = +ul2; |
| 298 |
bl = +bl2; // expected-error {{invalid argument type}} |
| 299 |
|
| 300 |
fd = +fd2; |
| 301 |
|
| 302 |
sc = +si2; // expected-error {{assigning to}} |
| 303 |
ui = +si2; // expected-error {{assigning to}} |
| 304 |
ui = +bi2; // expected-error {{invalid argument type}} |
| 305 |
|
| 306 |
// ------------------------------------------------------------------------- |
| 307 |
// Test unary -. |
| 308 |
// ------------------------------------------------------------------------- |
| 309 |
|
| 310 |
sc = -sc2; |
| 311 |
uc = -uc2; |
| 312 |
bc = -bc2; // expected-error {{invalid argument type}} |
| 313 |
|
| 314 |
ss = -ss2; |
| 315 |
us = -us2; |
| 316 |
bs = -bs2; // expected-error {{invalid argument type}} |
| 317 |
|
| 318 |
si = -si2; |
| 319 |
ui = -ui2; |
| 320 |
bi = -bi2; // expected-error {{invalid argument type}} |
| 321 |
|
| 322 |
sl = -sl2; |
| 323 |
ul = -ul2; |
| 324 |
bl = -bl2; // expected-error {{invalid argument type}} |
| 325 |
|
| 326 |
fd = -fd2; |
| 327 |
|
| 328 |
sc = -si2; // expected-error {{assigning to}} |
| 329 |
ui = -si2; // expected-error {{assigning to}} |
| 330 |
ui = -bi2; // expected-error {{invalid argument type}} |
| 331 |
|
| 332 |
// ------------------------------------------------------------------------- |
| 333 |
// Test ~. |
| 334 |
// ------------------------------------------------------------------------- |
| 335 |
|
| 336 |
sc = ~sc2; |
| 337 |
uc = ~uc2; |
| 338 |
bc = ~bc2; |
| 339 |
|
| 340 |
ss = ~ss2; |
| 341 |
us = ~us2; |
| 342 |
bs = ~bs2; |
| 343 |
|
| 344 |
si = ~si2; |
| 345 |
ui = ~ui2; |
| 346 |
bi = ~bi2; |
| 347 |
|
| 348 |
sl = ~sl2; |
| 349 |
ul = ~ul2; |
| 350 |
bl = ~bl2; |
| 351 |
|
| 352 |
fd = ~fd2; // expected-error {{invalid argument}} |
| 353 |
|
| 354 |
sc = ~si2; // expected-error {{assigning to}} |
| 355 |
ui = ~si2; // expected-error {{assigning to}} |
| 356 |
ui = ~bi2; // expected-error {{assigning to}} |
| 357 |
|
| 358 |
// ------------------------------------------------------------------------- |
| 359 |
// Test binary +. |
| 360 |
// ------------------------------------------------------------------------- |
| 361 |
|
| 362 |
sc = sc + sc2; |
| 363 |
sc = sc + uc2; // expected-error {{cannot convert}} |
| 364 |
sc = uc + sc2; // expected-error {{cannot convert}} |
| 365 |
sc = sc + bc2; |
| 366 |
sc = bc + sc2; |
| 367 |
|
| 368 |
uc = uc + uc2; |
| 369 |
uc = sc + uc2; // expected-error {{cannot convert}} |
| 370 |
uc = uc + sc2; // expected-error {{cannot convert}} |
| 371 |
uc = bc + uc2; |
| 372 |
uc = uc + bc2; |
| 373 |
|
| 374 |
bc = bc + bc2; // expected-error {{invalid operands}} |
| 375 |
bc = bc + uc2; // expected-error {{incompatible type}} |
| 376 |
bc = uc + bc2; // expected-error {{incompatible type}} |
| 377 |
bc = bc + sc2; // expected-error {{incompatible type}} |
| 378 |
bc = sc + bc2; // expected-error {{incompatible type}} |
| 379 |
|
| 380 |
sc = sc + sc_scalar; |
| 381 |
sc = sc + uc_scalar; // expected-error {{cannot convert between scalar type 'unsigned char' and vector type '__vector signed char' (vector of 16 'signed char' values) as implicit conversion would cause truncation}} |
| 382 |
sc = sc_scalar + sc; |
| 383 |
sc = uc_scalar + sc; // expected-error {{cannot convert between scalar type 'unsigned char' and vector type '__vector signed char' (vector of 16 'signed char' values) as implicit conversion would cause truncation}} |
| 384 |
uc = uc + sc_scalar; // expected-error {{implicit conversion changes signedness: 'signed char' to '__vector unsigned char' (vector of 16 'unsigned char' values)}} |
| 385 |
uc = uc + uc_scalar; |
| 386 |
uc = sc_scalar + uc; // expected-error {{implicit conversion changes signedness: 'signed char' to '__vector unsigned char' (vector of 16 'unsigned char' values)}} |
| 387 |
uc = uc_scalar + uc; |
| 388 |
|
| 389 |
ss = ss + ss2; |
| 390 |
us = us + us2; |
| 391 |
bs = bs + bs2; // expected-error {{invalid operands}} |
| 392 |
|
| 393 |
si = si + si2; |
| 394 |
ui = ui + ui2; |
| 395 |
bi = bi + bi2; // expected-error {{invalid operands}} |
| 396 |
|
| 397 |
sl = sl + sl2; |
| 398 |
ul = ul + ul2; |
| 399 |
bl = bl + bl2; // expected-error {{invalid operands}} |
| 400 |
|
| 401 |
fd = fd + fd2; |
| 402 |
fd = fd + ul2; // expected-error {{cannot convert}} |
| 403 |
fd = sl + fd2; // expected-error {{cannot convert}} |
| 404 |
|
| 405 |
sc += sc2; |
| 406 |
sc += uc2; // expected-error {{cannot convert}} |
| 407 |
sc += bc2; |
| 408 |
|
| 409 |
uc += uc2; |
| 410 |
uc += sc2; // expected-error {{cannot convert}} |
| 411 |
uc += bc2; |
| 412 |
|
| 413 |
bc += bc2; // expected-error {{invalid operands}} |
| 414 |
bc += sc2; // expected-error {{cannot convert}} |
| 415 |
bc += uc2; // expected-error {{cannot convert}} |
| 416 |
|
| 417 |
sc += ss2; // expected-error {{cannot convert}} |
| 418 |
sc += si2; // expected-error {{cannot convert}} |
| 419 |
sc += sl2; // expected-error {{cannot convert}} |
| 420 |
sc += fd2; // expected-error {{cannot convert}} |
| 421 |
|
| 422 |
sc += sc_scalar; |
| 423 |
sc += uc_scalar; // expected-error {{cannot convert between scalar type 'unsigned char' and vector type '__vector signed char' (vector of 16 'signed char' values) as implicit conversion would cause truncation}} |
| 424 |
uc += sc_scalar; // expected-error {{implicit conversion changes signedness: 'signed char' to '__vector unsigned char' (vector of 16 'unsigned char' values)}} |
| 425 |
uc += uc_scalar; |
| 426 |
|
| 427 |
ss += ss2; |
| 428 |
us += us2; |
| 429 |
bs += bs2; // expected-error {{invalid operands}} |
| 430 |
|
| 431 |
si += si2; |
| 432 |
ui += ui2; |
| 433 |
bi += bi2; // expected-error {{invalid operands}} |
| 434 |
|
| 435 |
sl += sl2; |
| 436 |
ul += ul2; |
| 437 |
bl += bl2; // expected-error {{invalid operands}} |
| 438 |
|
| 439 |
fd += fd2; |
| 440 |
|
| 441 |
// ------------------------------------------------------------------------- |
| 442 |
// Test that binary + rules apply to binary - too. |
| 443 |
// ------------------------------------------------------------------------- |
| 444 |
|
| 445 |
sc = sc - sc2; |
| 446 |
uc = uc - uc2; |
| 447 |
bc = bc - bc2; // expected-error {{invalid operands}} |
| 448 |
|
| 449 |
sc = uc - sc2; // expected-error {{cannot convert}} |
| 450 |
sc = sc - bc2; |
| 451 |
uc = bc - uc2; |
| 452 |
|
| 453 |
sc -= sc2; |
| 454 |
uc -= uc2; |
| 455 |
bc -= bc2; // expected-error {{invalid operands}} |
| 456 |
|
| 457 |
sc -= uc2; // expected-error {{cannot convert}} |
| 458 |
uc -= bc2; |
| 459 |
bc -= sc2; // expected-error {{cannot convert}} |
| 460 |
|
| 461 |
ss -= ss2; |
| 462 |
us -= us2; |
| 463 |
bs -= bs2; // expected-error {{invalid operands}} |
| 464 |
|
| 465 |
si -= si2; |
| 466 |
ui -= ui2; |
| 467 |
bi -= bi2; // expected-error {{invalid operands}} |
| 468 |
|
| 469 |
sl -= sl2; |
| 470 |
ul -= ul2; |
| 471 |
bl -= bl2; // expected-error {{invalid operands}} |
| 472 |
|
| 473 |
fd -= fd2; |
| 474 |
|
| 475 |
// ------------------------------------------------------------------------- |
| 476 |
// Test that binary + rules apply to * too. 64-bit integer multiplication |
| 477 |
// is not required by the spec and so isn't tested here. |
| 478 |
// ------------------------------------------------------------------------- |
| 479 |
|
| 480 |
sc = sc * sc2; |
| 481 |
uc = uc * uc2; |
| 482 |
bc = bc * bc2; // expected-error {{invalid operands}} |
| 483 |
|
| 484 |
sc = uc * sc2; // expected-error {{cannot convert}} |
| 485 |
sc = sc * bc2; // expected-error {{cannot convert}} |
| 486 |
uc = bc * uc2; // expected-error {{cannot convert}} |
| 487 |
|
| 488 |
sc *= sc2; |
| 489 |
uc *= uc2; |
| 490 |
bc *= bc2; // expected-error {{invalid operands}} |
| 491 |
|
| 492 |
sc *= uc2; // expected-error {{cannot convert}} |
| 493 |
uc *= bc2; // expected-error {{cannot convert}} |
| 494 |
bc *= sc2; // expected-error {{cannot convert}} |
| 495 |
|
| 496 |
ss *= ss2; |
| 497 |
us *= us2; |
| 498 |
bs *= bs2; // expected-error {{invalid operands}} |
| 499 |
|
| 500 |
si *= si2; |
| 501 |
ui *= ui2; |
| 502 |
bi *= bi2; // expected-error {{invalid operands}} |
| 503 |
|
| 504 |
sl *= sl2; |
| 505 |
ul *= ul2; |
| 506 |
bl *= bl2; // expected-error {{invalid operands}} |
| 507 |
|
| 508 |
fd *= fd2; |
| 509 |
|
| 510 |
// ------------------------------------------------------------------------- |
| 511 |
// Test that * rules apply to / too. |
| 512 |
// ------------------------------------------------------------------------- |
| 513 |
|
| 514 |
sc = sc / sc2; |
| 515 |
uc = uc / uc2; |
| 516 |
bc = bc / bc2; // expected-error {{invalid operands}} |
| 517 |
|
| 518 |
sc = uc / sc2; // expected-error {{cannot convert}} |
| 519 |
sc = sc / bc2; // expected-error {{cannot convert}} |
| 520 |
uc = bc / uc2; // expected-error {{cannot convert}} |
| 521 |
|
| 522 |
sc /= sc2; |
| 523 |
uc /= uc2; |
| 524 |
bc /= bc2; // expected-error {{invalid operands}} |
| 525 |
|
| 526 |
sc /= uc2; // expected-error {{cannot convert}} |
| 527 |
uc /= bc2; // expected-error {{cannot convert}} |
| 528 |
bc /= sc2; // expected-error {{cannot convert}} |
| 529 |
|
| 530 |
ss /= ss2; |
| 531 |
us /= us2; |
| 532 |
bs /= bs2; // expected-error {{invalid operands}} |
| 533 |
|
| 534 |
si /= si2; |
| 535 |
ui /= ui2; |
| 536 |
bi /= bi2; // expected-error {{invalid operands}} |
| 537 |
|
| 538 |
sl /= sl2; |
| 539 |
ul /= ul2; |
| 540 |
bl /= bl2; // expected-error {{invalid operands}} |
| 541 |
|
| 542 |
fd /= fd2; |
| 543 |
|
| 544 |
// ------------------------------------------------------------------------- |
| 545 |
// Test that / rules apply to % too, except that doubles are not allowed. |
| 546 |
// ------------------------------------------------------------------------- |
| 547 |
|
| 548 |
sc = sc % sc2; |
| 549 |
uc = uc % uc2; |
| 550 |
bc = bc % bc2; // expected-error {{invalid operands}} |
| 551 |
|
| 552 |
sc = uc % sc2; // expected-error {{cannot convert}} |
| 553 |
sc = sc % bc2; // expected-error {{cannot convert}} |
| 554 |
uc = bc % uc2; // expected-error {{cannot convert}} |
| 555 |
|
| 556 |
sc %= sc2; |
| 557 |
uc %= uc2; |
| 558 |
bc %= bc2; // expected-error {{invalid operands}} |
| 559 |
|
| 560 |
sc %= uc2; // expected-error {{cannot convert}} |
| 561 |
uc %= bc2; // expected-error {{cannot convert}} |
| 562 |
bc %= sc2; // expected-error {{cannot convert}} |
| 563 |
|
| 564 |
ss %= ss2; |
| 565 |
us %= us2; |
| 566 |
bs %= bs2; // expected-error {{invalid operands}} |
| 567 |
|
| 568 |
si %= si2; |
| 569 |
ui %= ui2; |
| 570 |
bi %= bi2; // expected-error {{invalid operands}} |
| 571 |
|
| 572 |
sl %= sl2; |
| 573 |
ul %= ul2; |
| 574 |
bl %= bl2; // expected-error {{invalid operands}} |
| 575 |
|
| 576 |
fd %= fd2; // expected-error {{invalid operands}} |
| 577 |
|
| 578 |
// ------------------------------------------------------------------------- |
| 579 |
// Test &. |
| 580 |
// ------------------------------------------------------------------------- |
| 581 |
|
| 582 |
sc = sc & sc2; |
| 583 |
sc = sc & uc2; // expected-error {{cannot convert}} |
| 584 |
sc = uc & sc2; // expected-error {{cannot convert}} |
| 585 |
sc = sc & bc2; |
| 586 |
sc = bc & sc2; |
| 587 |
|
| 588 |
uc = uc & uc2; |
| 589 |
uc = sc & uc2; // expected-error {{cannot convert}} |
| 590 |
uc = uc & sc2; // expected-error {{cannot convert}} |
| 591 |
uc = bc & uc2; |
| 592 |
uc = uc & bc2; |
| 593 |
|
| 594 |
bc = bc & bc2; |
| 595 |
bc = bc & uc2; // expected-error {{incompatible type}} |
| 596 |
bc = uc & bc2; // expected-error {{incompatible type}} |
| 597 |
bc = bc & sc2; // expected-error {{incompatible type}} |
| 598 |
bc = sc & bc2; // expected-error {{incompatible type}} |
| 599 |
|
| 600 |
fd = fd & fd2; // expected-error {{invalid operands}} |
| 601 |
fd = bl & fd2; // expected-error {{invalid operands}} |
| 602 |
fd = fd & bl2; // expected-error {{invalid operands}} |
| 603 |
fd = fd & sl2; // expected-error {{invalid operands}} |
| 604 |
fd = fd & ul2; // expected-error {{invalid operands}} |
| 605 |
|
| 606 |
sc &= sc2; |
| 607 |
sc &= uc2; // expected-error {{cannot convert}} |
| 608 |
sc &= bc2; |
| 609 |
|
| 610 |
uc &= uc2; |
| 611 |
uc &= sc2; // expected-error {{cannot convert}} |
| 612 |
uc &= bc2; |
| 613 |
|
| 614 |
bc &= bc2; |
| 615 |
bc &= sc2; // expected-error {{cannot convert}} |
| 616 |
bc &= uc2; // expected-error {{cannot convert}} |
| 617 |
|
| 618 |
sc &= ss2; // expected-error {{cannot convert}} |
| 619 |
sc &= si2; // expected-error {{cannot convert}} |
| 620 |
sc &= sl2; // expected-error {{cannot convert}} |
| 621 |
sc &= fd2; // expected-error {{invalid operands}} |
| 622 |
|
| 623 |
us &= bc2; // expected-error {{cannot convert}} |
| 624 |
ui &= bc2; // expected-error {{cannot convert}} |
| 625 |
ul &= bc2; // expected-error {{cannot convert}} |
| 626 |
fd &= bc2; // expected-error {{invalid operands}} |
| 627 |
|
| 628 |
ss &= ss2; |
| 629 |
us &= us2; |
| 630 |
bs &= bs2; |
| 631 |
|
| 632 |
si &= si2; |
| 633 |
ui &= ui2; |
| 634 |
bi &= bi2; |
| 635 |
|
| 636 |
sl &= sl2; |
| 637 |
ul &= ul2; |
| 638 |
bl &= bl2; |
| 639 |
|
| 640 |
// ------------------------------------------------------------------------- |
| 641 |
// Test that & rules apply to | too. |
| 642 |
// ------------------------------------------------------------------------- |
| 643 |
|
| 644 |
sc = sc | sc2; |
| 645 |
sc = sc | uc2; // expected-error {{cannot convert}} |
| 646 |
sc = sc | bc2; |
| 647 |
|
| 648 |
uc = uc | uc2; |
| 649 |
uc = sc | uc2; // expected-error {{cannot convert}} |
| 650 |
uc = bc | uc2; |
| 651 |
|
| 652 |
bc = bc | bc2; |
| 653 |
bc = uc | bc2; // expected-error {{incompatible type}} |
| 654 |
bc = bc | sc2; // expected-error {{incompatible type}} |
| 655 |
|
| 656 |
fd = fd | fd2; // expected-error {{invalid operands}} |
| 657 |
fd = bl | fd2; // expected-error {{invalid operands}} |
| 658 |
|
| 659 |
ss |= ss2; |
| 660 |
us |= us2; |
| 661 |
bs |= bs2; |
| 662 |
|
| 663 |
si |= si2; |
| 664 |
ui |= ui2; |
| 665 |
bi |= bi2; |
| 666 |
|
| 667 |
sl |= sl2; |
| 668 |
ul |= ul2; |
| 669 |
bl |= bl2; |
| 670 |
|
| 671 |
fd |= bl2; // expected-error {{invalid operands}} |
| 672 |
fd |= fd2; // expected-error {{invalid operands}} |
| 673 |
|
| 674 |
// ------------------------------------------------------------------------- |
| 675 |
// Test that & rules apply to ^ too. |
| 676 |
// ------------------------------------------------------------------------- |
| 677 |
|
| 678 |
sc = sc ^ sc2; |
| 679 |
sc = sc ^ uc2; // expected-error {{cannot convert}} |
| 680 |
sc = sc ^ bc2; |
| 681 |
|
| 682 |
uc = uc ^ uc2; |
| 683 |
uc = sc ^ uc2; // expected-error {{cannot convert}} |
| 684 |
uc = bc ^ uc2; |
| 685 |
|
| 686 |
bc = bc ^ bc2; |
| 687 |
bc = uc ^ bc2; // expected-error {{incompatible type}} |
| 688 |
bc = bc ^ sc2; // expected-error {{incompatible type}} |
| 689 |
|
| 690 |
fd = fd ^ fd2; // expected-error {{invalid operands}} |
| 691 |
fd = bl ^ fd2; // expected-error {{invalid operands}} |
| 692 |
|
| 693 |
ss ^= ss2; |
| 694 |
us ^= us2; |
| 695 |
bs ^= bs2; |
| 696 |
|
| 697 |
si ^= si2; |
| 698 |
ui ^= ui2; |
| 699 |
bi ^= bi2; |
| 700 |
|
| 701 |
sl ^= sl2; |
| 702 |
ul ^= ul2; |
| 703 |
bl ^= bl2; |
| 704 |
|
| 705 |
fd ^= bl2; // expected-error {{invalid operands}} |
| 706 |
fd ^= fd2; // expected-error {{invalid operands}} |
| 707 |
|
| 708 |
// ------------------------------------------------------------------------- |
| 709 |
// Test <<. |
| 710 |
// ------------------------------------------------------------------------- |
| 711 |
|
| 712 |
sc = sc << sc2; |
| 713 |
sc = sc << uc2; |
| 714 |
sc = uc << sc2; // expected-error {{incompatible type}} |
| 715 |
sc = sc << bc2; // expected-error {{invalid operands}} |
| 716 |
sc = bc << sc2; // expected-error {{invalid operands}} |
| 717 |
|
| 718 |
uc = uc << uc2; |
| 719 |
uc = sc << uc2; // expected-error {{assigning to}} |
| 720 |
uc = uc << sc2; |
| 721 |
uc = bc << uc2; // expected-error {{invalid operands}} |
| 722 |
uc = uc << bc2; // expected-error {{invalid operands}} |
| 723 |
|
| 724 |
bc = bc << bc2; // expected-error {{invalid operands}} |
| 725 |
bc = bc << uc2; // expected-error {{invalid operands}} |
| 726 |
bc = uc << bc2; // expected-error {{invalid operands}} |
| 727 |
bc = bc << sc2; // expected-error {{invalid operands}} |
| 728 |
bc = sc << bc2; // expected-error {{invalid operands}} |
| 729 |
|
| 730 |
sc = sc << 1; |
| 731 |
sc = sc << 1.0f; // expected-error {{integer is required}} |
| 732 |
sc = sc << sc_scalar; |
| 733 |
sc = sc << uc_scalar; |
| 734 |
sc = sc << ss_scalar; |
| 735 |
sc = sc << us_scalar; |
| 736 |
sc = sc << si_scalar; |
| 737 |
sc = sc << ui_scalar; |
| 738 |
sc = sc << sl_scalar; |
| 739 |
sc = sc << ul_scalar; |
| 740 |
sc = sc_scalar << sc; // expected-error {{first operand is not a vector}} |
| 741 |
sc = uc_scalar << sc; // expected-error {{first operand is not a vector}} |
| 742 |
uc = uc << sc_scalar; |
| 743 |
uc = uc << uc_scalar; |
| 744 |
uc = sc_scalar << uc; // expected-error {{first operand is not a vector}} |
| 745 |
uc = uc_scalar << uc; // expected-error {{first operand is not a vector}} |
| 746 |
|
| 747 |
ss = ss << ss2; |
| 748 |
ss = ss << ss_scalar; |
| 749 |
us = us << us2; |
| 750 |
us = us << us_scalar; |
| 751 |
bs = bs << bs2; // expected-error {{invalid operands}} |
| 752 |
|
| 753 |
si = si << si2; |
| 754 |
si = si << si_scalar; |
| 755 |
ui = ui << ui2; |
| 756 |
ui = ui << ui_scalar; |
| 757 |
bi = bi << bi2; // expected-error {{invalid operands}} |
| 758 |
|
| 759 |
sl = sl << sl2; |
| 760 |
sl = sl << sl_scalar; |
| 761 |
ul = ul << ul2; |
| 762 |
ul = ul << ul_scalar; |
| 763 |
bl = bl << bl2; // expected-error {{invalid operands}} |
| 764 |
|
| 765 |
fd = fd << fd2; // expected-error {{integer is required}} |
| 766 |
fd = fd << ul2; // expected-error {{integer is required}} |
| 767 |
fd = sl << fd2; // expected-error {{integer is required}} |
| 768 |
|
| 769 |
sc <<= sc2; |
| 770 |
sc <<= uc2; |
| 771 |
sc <<= bc2; // expected-error {{invalid operands}} |
| 772 |
sc <<= sc_scalar; |
| 773 |
|
| 774 |
uc <<= uc2; |
| 775 |
uc <<= sc2; |
| 776 |
uc <<= bc2; // expected-error {{invalid operands}} |
| 777 |
uc <<= uc_scalar; |
| 778 |
|
| 779 |
bc <<= bc2; // expected-error {{invalid operands}} |
| 780 |
bc <<= sc2; // expected-error {{invalid operands}} |
| 781 |
bc <<= uc2; // expected-error {{invalid operands}} |
| 782 |
|
| 783 |
sc <<= ss2; // expected-error {{vector operands do not have the same number of elements}} |
| 784 |
sc <<= si2; // expected-error {{vector operands do not have the same number of elements}} |
| 785 |
sc <<= sl2; // expected-error {{vector operands do not have the same number of elements}} |
| 786 |
sc <<= fd2; // expected-error {{integer is required}} |
| 787 |
|
| 788 |
ss <<= ss2; |
| 789 |
ss <<= ss_scalar; |
| 790 |
us <<= us2; |
| 791 |
us <<= us_scalar; |
| 792 |
bs <<= bs2; // expected-error {{invalid operands}} |
| 793 |
|
| 794 |
si <<= si2; |
| 795 |
si <<= si_scalar; |
| 796 |
ui <<= ui2; |
| 797 |
ui <<= ui_scalar; |
| 798 |
bi <<= bi2; // expected-error {{invalid operands}} |
| 799 |
|
| 800 |
sl <<= sl2; |
| 801 |
sl <<= sl_scalar; |
| 802 |
ul <<= ul2; |
| 803 |
ul <<= ul_scalar; |
| 804 |
bl <<= bl2; // expected-error {{invalid operands}} |
| 805 |
|
| 806 |
fd <<= fd2; // expected-error {{integer is required}} |
| 807 |
|
| 808 |
// ------------------------------------------------------------------------- |
| 809 |
// Test >>. |
| 810 |
// ------------------------------------------------------------------------- |
| 811 |
|
| 812 |
sc = sc >> sc2; |
| 813 |
sc = sc >> uc2; |
| 814 |
sc = uc >> sc2; // expected-error {{incompatible type}} |
| 815 |
sc = sc >> bc2; // expected-error {{invalid operands}} |
| 816 |
sc = bc >> sc2; // expected-error {{invalid operands}} |
| 817 |
|
| 818 |
uc = uc >> uc2; |
| 819 |
uc = sc >> uc2; // expected-error {{assigning to}} |
| 820 |
uc = uc >> sc2; |
| 821 |
uc = bc >> uc2; // expected-error {{invalid operands}} |
| 822 |
uc = uc >> bc2; // expected-error {{invalid operands}} |
| 823 |
|
| 824 |
bc = bc >> bc2; // expected-error {{invalid operands}} |
| 825 |
bc = bc >> uc2; // expected-error {{invalid operands}} |
| 826 |
bc = uc >> bc2; // expected-error {{invalid operands}} |
| 827 |
bc = bc >> sc2; // expected-error {{invalid operands}} |
| 828 |
bc = sc >> bc2; // expected-error {{invalid operands}} |
| 829 |
|
| 830 |
sc = sc >> 1; |
| 831 |
sc = sc >> 1.0f; // expected-error {{integer is required}} |
| 832 |
sc = sc >> sc_scalar; |
| 833 |
sc = sc >> uc_scalar; |
| 834 |
sc = sc >> ss_scalar; |
| 835 |
sc = sc >> us_scalar; |
| 836 |
sc = sc >> si_scalar; |
| 837 |
sc = sc >> ui_scalar; |
| 838 |
sc = sc >> sl_scalar; |
| 839 |
sc = sc >> ul_scalar; |
| 840 |
sc = sc_scalar >> sc; // expected-error {{first operand is not a vector}} |
| 841 |
sc = uc_scalar >> sc; // expected-error {{first operand is not a vector}} |
| 842 |
uc = uc >> sc_scalar; |
| 843 |
uc = uc >> uc_scalar; |
| 844 |
uc = sc_scalar >> uc; // expected-error {{first operand is not a vector}} |
| 845 |
uc = uc_scalar >> uc; // expected-error {{first operand is not a vector}} |
| 846 |
|
| 847 |
ss = ss >> ss2; |
| 848 |
ss = ss >> ss_scalar; |
| 849 |
us = us >> us2; |
| 850 |
us = us >> us_scalar; |
| 851 |
bs = bs >> bs2; // expected-error {{invalid operands}} |
| 852 |
|
| 853 |
si = si >> si2; |
| 854 |
si = si >> si_scalar; |
| 855 |
ui = ui >> ui2; |
| 856 |
ui = ui >> ui_scalar; |
| 857 |
bi = bi >> bi2; // expected-error {{invalid operands}} |
| 858 |
|
| 859 |
sl = sl >> sl2; |
| 860 |
sl = sl >> sl_scalar; |
| 861 |
ul = ul >> ul2; |
| 862 |
ul = ul >> ul_scalar; |
| 863 |
bl = bl >> bl2; // expected-error {{invalid operands}} |
| 864 |
|
| 865 |
fd = fd >> fd2; // expected-error {{integer is required}} |
| 866 |
fd = fd >> ul2; // expected-error {{integer is required}} |
| 867 |
fd = sl >> fd2; // expected-error {{integer is required}} |
| 868 |
|
| 869 |
sc >>= sc2; |
| 870 |
sc >>= uc2; |
| 871 |
sc >>= bc2; // expected-error {{invalid operands}} |
| 872 |
sc >>= sc_scalar; |
| 873 |
|
| 874 |
uc >>= uc2; |
| 875 |
uc >>= sc2; |
| 876 |
uc >>= bc2; // expected-error {{invalid operands}} |
| 877 |
uc >>= uc_scalar; |
| 878 |
|
| 879 |
bc >>= bc2; // expected-error {{invalid operands}} |
| 880 |
bc >>= sc2; // expected-error {{invalid operands}} |
| 881 |
bc >>= uc2; // expected-error {{invalid operands}} |
| 882 |
|
| 883 |
sc >>= ss2; // expected-error {{vector operands do not have the same number of elements}} |
| 884 |
sc >>= si2; // expected-error {{vector operands do not have the same number of elements}} |
| 885 |
sc >>= sl2; // expected-error {{vector operands do not have the same number of elements}} |
| 886 |
sc >>= fd2; // expected-error {{integer is required}} |
| 887 |
|
| 888 |
ss >>= ss2; |
| 889 |
ss >>= ss_scalar; |
| 890 |
us >>= us2; |
| 891 |
us >>= us_scalar; |
| 892 |
bs >>= bs2; // expected-error {{invalid operands}} |
| 893 |
|
| 894 |
si >>= si2; |
| 895 |
si >>= si_scalar; |
| 896 |
ui >>= ui2; |
| 897 |
ui >>= ui_scalar; |
| 898 |
bi >>= bi2; // expected-error {{invalid operands}} |
| 899 |
|
| 900 |
sl >>= sl2; |
| 901 |
sl >>= sl_scalar; |
| 902 |
ul >>= ul2; |
| 903 |
ul >>= ul_scalar; |
| 904 |
bl >>= bl2; // expected-error {{invalid operands}} |
| 905 |
|
| 906 |
fd >>= fd2; // expected-error {{integer is required}} |
| 907 |
|
| 908 |
// ------------------------------------------------------------------------- |
| 909 |
// Test ==. |
| 910 |
// ------------------------------------------------------------------------- |
| 911 |
|
| 912 |
(void)(sc == sc2); |
| 913 |
(void)(uc == uc2); |
| 914 |
(void)(bc == bc2); |
| 915 |
|
| 916 |
(void)(sc == uc); // expected-error {{cannot convert}} |
| 917 |
(void)(sc == bc); |
| 918 |
|
| 919 |
(void)(uc == sc); // expected-error {{cannot convert}} |
| 920 |
(void)(uc == bc); |
| 921 |
|
| 922 |
(void)(bc == sc); |
| 923 |
(void)(bc == uc); |
| 924 |
|
| 925 |
(void)(ss == ss2); |
| 926 |
(void)(us == us2); |
| 927 |
(void)(bs == bs2); |
| 928 |
|
| 929 |
(void)(si == si2); |
| 930 |
(void)(ui == ui2); |
| 931 |
(void)(bi == bi2); |
| 932 |
|
| 933 |
(void)(sl == sl2); |
| 934 |
(void)(ul == ul2); |
| 935 |
(void)(bl == bl2); |
| 936 |
(void)(fd == fd2); |
| 937 |
|
| 938 |
(void)(fd == ul); // expected-error {{cannot convert}} |
| 939 |
(void)(ul == fd); // expected-error {{cannot convert}} |
| 940 |
|
| 941 |
// ------------------------------------------------------------------------- |
| 942 |
// Test that == rules apply to != too. |
| 943 |
// ------------------------------------------------------------------------- |
| 944 |
|
| 945 |
(void)(sc != sc2); |
| 946 |
(void)(uc != uc2); |
| 947 |
(void)(bc != bc2); |
| 948 |
|
| 949 |
(void)(sc != uc); // expected-error {{cannot convert}} |
| 950 |
(void)(sc != bc); |
| 951 |
|
| 952 |
(void)(ss != ss2); |
| 953 |
(void)(us != us2); |
| 954 |
(void)(bs != bs2); |
| 955 |
|
| 956 |
(void)(si != si2); |
| 957 |
(void)(ui != ui2); |
| 958 |
(void)(bi != bi2); |
| 959 |
|
| 960 |
(void)(sl != sl2); |
| 961 |
(void)(ul != ul2); |
| 962 |
(void)(bl != bl2); |
| 963 |
(void)(fd != fd2); |
| 964 |
|
| 965 |
// ------------------------------------------------------------------------- |
| 966 |
// Test that == rules apply to <= too. |
| 967 |
// ------------------------------------------------------------------------- |
| 968 |
|
| 969 |
(void)(sc <= sc2); |
| 970 |
(void)(uc <= uc2); |
| 971 |
(void)(bc <= bc2); |
| 972 |
|
| 973 |
(void)(sc <= uc); // expected-error {{cannot convert}} |
| 974 |
(void)(sc <= bc); |
| 975 |
|
| 976 |
(void)(ss <= ss2); |
| 977 |
(void)(us <= us2); |
| 978 |
(void)(bs <= bs2); |
| 979 |
|
| 980 |
(void)(si <= si2); |
| 981 |
(void)(ui <= ui2); |
| 982 |
(void)(bi <= bi2); |
| 983 |
|
| 984 |
(void)(sl <= sl2); |
| 985 |
(void)(ul <= ul2); |
| 986 |
(void)(bl <= bl2); |
| 987 |
(void)(fd <= fd2); |
| 988 |
|
| 989 |
// ------------------------------------------------------------------------- |
| 990 |
// Test that == rules apply to >= too. |
| 991 |
// ------------------------------------------------------------------------- |
| 992 |
|
| 993 |
(void)(sc >= sc2); |
| 994 |
(void)(uc >= uc2); |
| 995 |
(void)(bc >= bc2); |
| 996 |
|
| 997 |
(void)(sc >= uc); // expected-error {{cannot convert}} |
| 998 |
(void)(sc >= bc); |
| 999 |
|
| 1000 |
(void)(ss >= ss2); |
| 1001 |
(void)(us >= us2); |
| 1002 |
(void)(bs >= bs2); |
| 1003 |
|
| 1004 |
(void)(si >= si2); |
| 1005 |
(void)(ui >= ui2); |
| 1006 |
(void)(bi >= bi2); |
| 1007 |
|
| 1008 |
(void)(sl >= sl2); |
| 1009 |
(void)(ul >= ul2); |
| 1010 |
(void)(bl >= bl2); |
| 1011 |
(void)(fd >= fd2); |
| 1012 |
|
| 1013 |
// ------------------------------------------------------------------------- |
| 1014 |
// Test that == rules apply to < too. |
| 1015 |
// ------------------------------------------------------------------------- |
| 1016 |
|
| 1017 |
(void)(sc < sc2); |
| 1018 |
(void)(uc < uc2); |
| 1019 |
(void)(bc < bc2); |
| 1020 |
|
| 1021 |
(void)(sc < uc); // expected-error {{cannot convert}} |
| 1022 |
(void)(sc < bc); |
| 1023 |
|
| 1024 |
(void)(ss < ss2); |
| 1025 |
(void)(us < us2); |
| 1026 |
(void)(bs < bs2); |
| 1027 |
|
| 1028 |
(void)(si < si2); |
| 1029 |
(void)(ui < ui2); |
| 1030 |
(void)(bi < bi2); |
| 1031 |
|
| 1032 |
(void)(sl < sl2); |
| 1033 |
(void)(ul < ul2); |
| 1034 |
(void)(bl < bl2); |
| 1035 |
(void)(fd < fd2); |
| 1036 |
|
| 1037 |
// ------------------------------------------------------------------------- |
| 1038 |
// Test that == rules apply to > too. |
| 1039 |
// ------------------------------------------------------------------------- |
| 1040 |
|
| 1041 |
(void)(sc > sc2); |
| 1042 |
(void)(uc > uc2); |
| 1043 |
(void)(bc > bc2); |
| 1044 |
|
| 1045 |
(void)(sc > uc); // expected-error {{cannot convert}} |
| 1046 |
(void)(sc > bc); |
| 1047 |
|
| 1048 |
(void)(ss > ss2); |
| 1049 |
(void)(us > us2); |
| 1050 |
(void)(bs > bs2); |
| 1051 |
|
| 1052 |
(void)(si > si2); |
| 1053 |
(void)(ui > ui2); |
| 1054 |
(void)(bi > bi2); |
| 1055 |
|
| 1056 |
(void)(sl > sl2); |
| 1057 |
(void)(ul > ul2); |
| 1058 |
(void)(bl > bl2); |
| 1059 |
(void)(fd > fd2); |
| 1060 |
} |