diff options
author | Gael Guennebaud <g.gael@free.fr> | 2011-02-21 16:11:18 +0100 |
---|---|---|
committer | Gael Guennebaud <g.gael@free.fr> | 2011-02-21 16:11:18 +0100 |
commit | fb1a29fed5ed37c96ead5babcb0050eb21b75d12 (patch) | |
tree | e36e1278dcc88f6a80cebf9865374799afe3b375 /Eigen/src/Core/arch/SSE/Complex.h | |
parent | e129e985c3cd36e8f5fe2e25db3d2a880298aae8 (diff) |
fix ICE and warning with gcc 4.2.4
Diffstat (limited to 'Eigen/src/Core/arch/SSE/Complex.h')
-rw-r--r-- | Eigen/src/Core/arch/SSE/Complex.h | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/Eigen/src/Core/arch/SSE/Complex.h b/Eigen/src/Core/arch/SSE/Complex.h index 6d67533e7..a149b68c7 100644 --- a/Eigen/src/Core/arch/SSE/Complex.h +++ b/Eigen/src/Core/arch/SSE/Complex.h @@ -105,15 +105,19 @@ template<> EIGEN_STRONG_INLINE void prefetch<std::complex<float> >(const std::co template<> EIGEN_STRONG_INLINE Packet2cf pset1<Packet2cf>(const std::complex<float>& from) { Packet2cf res; + #if EIGEN_GNUC_AT_MOST(4,2) + // workaround annoying "may be used uninitialized in this function" warning with gcc 4.2 + res.v = _mm_loadl_pi(_mm_set1_ps(0.0f), (const __m64*)&from); + #else res.v = _mm_loadl_pi(res.v, (const __m64*)&from); + #endif return Packet2cf(_mm_movelh_ps(res.v,res.v)); } template<> EIGEN_STRONG_INLINE std::complex<float> pfirst<Packet2cf>(const Packet2cf& a) { - #if (defined __GNUC__) && (((__GNUC__==4) && (__GNUC_MINOR__==2) && (__GNUC_PATCHLEVEL__<=3)) || ((__GNUC__==4) && (__GNUC_MINOR__==3))) - // Workaround gcc 4.2.1 ICE (mac's gcc version) - I'm not sure how the 4.2.2 and 4.2.3 deal with it, but 4.2.4 works well. - // this is not performance wise ideal, but who cares... + #if EIGEN_GNUC_AT_MOST(4,3) + // Workaround gcc 4.2 ICE - this is not performance wise ideal, but who cares... // This workaround also fix invalid code generation with gcc 4.3 EIGEN_ALIGN16 std::complex<float> res[2]; _mm_store_ps((float*)res, a.v); |