aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.dg/tree-ssa/forwprop-5.c
blob: 033c60dae0a1e9e237f5de7383e0091339d78b67 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
/* { dg-do compile } */
/* { dg-options "-O1 -fdump-tree-optimized -w" } */
/* { dg-options "-O1 -fdump-tree-optimized -w -msse" { target { i?86-*-* x86_64-*-* } } } */

#define vector __attribute__((vector_size(16) ))
struct VecClass
{
  vector float v;
};

vector float foo( vector float v )
{
    vector float x = v;
    x = x + x;
    struct VecClass disappear = *(struct VecClass*)&x;
    return disappear.v;
}

/* { dg-final { scan-tree-dump-times "disappear" 0 "optimized"} } */
/* { dg-final { cleanup-tree-dump "optimized" } } */