2018-11-07 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / g++.dg / torture / pr36445.C
blob56642e9ec73969069e9e3fa940baf38467adcca1
1 /* { dg-do compile } */
2 /* { dg-options "-msse" { target { i?86-*-* x86_64-*-* } } } */
3 // This used to fail as we would try to expand a VCE where one side had
4 // a mode of BLKmode and the other side was a vector mode.
5 #define vector __attribute__((vector_size(16) ))
6 struct struct1  {
7   union { float a[3]; }    vmx;
8   struct struct2   {
9     struct2(const struct2& r) {}
10   } w;
11 } __attribute__((aligned(16)));
12 struct struct3  {
13   vector float vmx;
14   operator const struct1& () const{
15     return *reinterpret_cast<const struct1*>(this);
16   }
18 struct3 func3( struct3 V1);
19 struct3 func2( void );
20 void func1( )  {
21   struct1 vVec = func2() ;
22   func3 ( (struct3&)vVec );