gcc/testsuite/gcc.dg/pr80286.c
raw| 1 | /* PR target/80286 */ |
| 2 | /* { dg-do run } */ |
| 3 | /* { dg-options "-O2 -Wno-psabi" } */ |
| 4 | |
| 5 | typedef int V __attribute__((vector_size (4 * sizeof (int)))); |
| 6 | |
| 7 | __attribute__((noinline, noclone)) V |
| 8 | foo (V x, V y) |
| 9 | { |
| 10 | return x << y[0]; |
| 11 | } |
| 12 | |
| 13 | int |
| 14 | main () |
| 15 | { |
| 16 | V x = { 1, 2, 3, 4 }; |
| 17 | V y = { 5, 6, 7, 8 }; |
| 18 | V z = foo (x, y); |
| 19 | V e = { 1 << 5, 2 << 5, 3 << 5, 4 << 5 }; |
| 20 | if (__builtin_memcmp (&z, &e, sizeof (V))) |
| 21 | __builtin_abort (); |
| 22 | return 0; |
| 23 | } |