Debian Codegraph @

gcc/testsuite/c-c++-common/builtin-shufflevector-2.c

raw
1 /* { dg-do compile } */
2
3 typedef long v4di __attribute__((vector_size(4 * sizeof (long))));
4 typedef int v4si __attribute__((vector_size(4 * sizeof (int))));
5 typedef int v8si __attribute__((vector_size(8 * sizeof (int))));
6
7 v4si res, a, b;
8 v4di resl, al, bl;
9 v8si res8, a8, b8;
10 void foo (void)
11 {
12 res = __builtin_shufflevector (a, 0, 0, 1, 4, 5); /* { dg-error "must be vectors" } */
13 res = __builtin_shufflevector (a, b, 0, 1, 4, 5, 6); /* { dg-error "power of two" } */
14 res = __builtin_shufflevector (a, b, 0, 1, 4, 8); /* { dg-error "invalid" } */
15 res = __builtin_shufflevector (a, b, 0, 1, -4, 5); /* { dg-error "invalid" } */
16 res = __builtin_shufflevector (a, bl, 0, 1, 4, 5); /* { dg-error "same element type" } */
17 resl = __builtin_shufflevector (a, b, 0, 1, 4, 5); /* { dg-error "" } incompatible types */
18 }