diff options
author | Gael Guennebaud <g.gael@free.fr> | 2011-02-18 15:47:17 +0100 |
---|---|---|
committer | Gael Guennebaud <g.gael@free.fr> | 2011-02-18 15:47:17 +0100 |
commit | 8f8c67b8bd2915d1927c848e557e5076a00e25f9 (patch) | |
tree | 676635f1825531f69eed3bf347a2909f195fb45f /Eigen/src/Core/arch/SSE/Complex.h | |
parent | f7cd63b964b272fecf8d3411393f60803432fc70 (diff) |
fix bug #186 (in 32 bits mode, gcc 4.3 messed up with pfirst for complex<float>)
Diffstat (limited to 'Eigen/src/Core/arch/SSE/Complex.h')
-rw-r--r-- | Eigen/src/Core/arch/SSE/Complex.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Eigen/src/Core/arch/SSE/Complex.h b/Eigen/src/Core/arch/SSE/Complex.h index 76d0206a3..6d67533e7 100644 --- a/Eigen/src/Core/arch/SSE/Complex.h +++ b/Eigen/src/Core/arch/SSE/Complex.h @@ -111,9 +111,10 @@ template<> EIGEN_STRONG_INLINE Packet2cf pset1<Packet2cf>(const std::complex<flo template<> EIGEN_STRONG_INLINE std::complex<float> pfirst<Packet2cf>(const Packet2cf& a) { - #if (defined __GNUC__) && (__GNUC__==4) && (__GNUC_MINOR__==2) && (__GNUC_PATCHLEVEL__<=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. + #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... + // 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); return res[0]; |