aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/pr119160.c
blob: b4629a11d9d2f2435676a6f52cbc64fbdb36d2a0 (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
/* { dg-do run } */
/* { dg-options "-O2 -finstrument-functions-once -favoid-store-forwarding -fnon-call-exceptions -fschedule-insns -mgeneral-regs-only -Wno-psabi" } */

typedef __attribute__((__vector_size__ (32))) int V;

void
foo (V v, V, V, V *r)
{
  V u = (V){} + v[0];
  *r = u;
}

__attribute__((__noipa__)) void
bar(int x)
{
 if (x != 2) __builtin_abort();
}

int
main ()
{
  V x;
  foo ((V){ 2, 3 }, (V){ }, (V){ }, &x);
  for (unsigned i = 0; i < sizeof(x)/sizeof(x[0]); i++)
    bar(x[i]);
}