summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/torture/pr70421.c
blob: 1aa4d534599eee77d90913d3a3229a5cfe775715 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
/* PR target/70421 */
/* { dg-do run } */
/* { dg-require-effective-target int32plus } */
/* { dg-additional-options "-Wno-psabi -w" } */

typedef unsigned V __attribute__ ((vector_size (64)));

unsigned __attribute__ ((noinline, noclone))
foo (unsigned x, V u, V v)
{
  v[1] ^= v[2];
  x ^= ((V) v)[u[0]];
  return x;
}

int
main ()
{
  unsigned x = foo (0x10, (V) { 1 }, (V) { 0x100, 0x1000, 0x10000 });
  if (x != 0x11010)
    __builtin_abort ();
  return 0;
}