PR middle-end/85602 - -Wsizeof-pointer-memaccess for strncat with size of source
[official-gcc.git] / gcc / testsuite / gcc.dg / pr80286.c
blob82f35b5009985e171d8559379a4ea4e84ea8dfca
1 /* PR target/80286 */
2 /* { dg-do run } */
3 /* { dg-options "-O2 -Wno-psabi" } */
5 typedef int V __attribute__((vector_size (4 * sizeof (int))));
7 __attribute__((noinline, noclone)) V
8 foo (V x, V y)
10 return x << y[0];
13 int
14 main ()
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;