aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/tree-ssa/ssa-fre-74.c
blob: 4439d838e8461fbcc09aa62316fa1492c69d7510 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
/* { dg-do compile } */
/* { dg-options "-O -fdump-tree-fre1" } */

typedef int v4si __attribute__((vector_size(__SIZEOF_INT__ * 4)));
int foo (int *a)
{
  a[2] = 2;
  a[0] = 0;
  a[1] = 1;
  a[3] = 4;
  v4si x = *(v4si *)a;
  *(v4si *)&a[4] = x;
  return a[4] + a[7];
}

/* { dg-final { scan-tree-dump "return 4;" "fre1" } } */