1 // { dg-do compile } 2 // { dg-additional-options "-w -Wno-psabi" } 3 // { dg-additional-options "-mavx" { target x86_64-*-* i?86-*-* } } 4 5 typedef double __m256d __attribute__ ((__vector_size__ (32), __may_alias__)); 6 7 struct SIMD { 8 __m256d data; SIMDSIMD9 SIMD() {}; SIMDSIMD10 SIMD (double val) { } SIMDSIMD11 SIMD(__m256d _data) { data = _data; } 12 SIMD operator* (SIMD a) { return a; } 13 }; 14 15 struct Foo { 16 SIMD val; 17 SIMD dval[2]; ValueFoo18 __attribute__((__always_inline__)) SIMD & Value() throw() { return val; } throwFoo19 __attribute__((__always_inline__)) Foo operator* ( const Foo & y) throw() 20 { 21 Foo res; 22 SIMD hx; 23 SIMD hy; 24 res.Value() = hx*hy; 25 res.dval[0] = hx*hy; 26 return res; 27 } 28 }; 29 30 template<typename Tx> inlineFunc(Tx hx[])31__attribute__((__always_inline__)) inline void inlineFunc(Tx hx[]) { 32 Tx x = hx[0], y = hx[1]; 33 Tx lam[1] = {(x*y)}; 34 } 35 FooBarFunc()36void FooBarFunc () { 37 Foo adp[2]; 38 inlineFunc (adp); 39 } 40