aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/pr101008.c
blob: 8229769c6acf208142fa4609dbd607980a3d8ce7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
/* PR rtl-optimization/101008 */
/* { dg-do compile } */
/* { dg-options "-O2 -g" } */
/* { dg-require-effective-target int32 } */

typedef unsigned __attribute__((__vector_size__(32))) U;
typedef unsigned __attribute__((__vector_size__(16))) V;

int c, r;

V v;

void
foo(void)
{
  U u = __builtin_shufflevector (v, (V)(v != c) | (V)(c == v),
				 4, 3, 5, 5, 1, 2, 3, 0);
  r = ((union { U a; int b; }) u).b;
}