aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/c-c++-common/pr63764-2.c
blob: 6bbf6611e6c0e5bad764a884ea786166f5308cfe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
/* PR target/63764 */
/* { dg-do compile } */

#define A __attribute__((vector_size (4 * sizeof (float))))
typedef float V A;

float
fn1 (V *x)
{
  V a = *x;
  return ((V) a)[0];
}

float
fn2 (V *x)
{
  float A a = *x;
  return ((float A) a)[0];
}

void
fn3 (V *x)
{
  V a = *x;
  a[0] = 0;
  *x = a;
}

void
fn4 (V *x)
{
  float A a = *x;
  a[0] = 0;
  *x = a;
}