summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/pr94574.c
blob: 0d18bd82832c83da35b2a7c22f18683500ed3889 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
/* { dg-do compile } */
/* { dg-options "-O2 -w -Wno-psabi" } */

typedef unsigned int v4si __attribute__((vector_size(16)));
typedef unsigned int v2si __attribute__((vector_size(8)));

/* The aliasing is somewhat dubious here, but it must compile.  */

v2si
foo (v4si v)
{
  v2si res;
  *(v4si *) &res = v;
  return res;
}