From 35f0bc70d80f0a9f380bd60fa39e15880e24335d Mon Sep 17 00:00:00 2001 From: Gael Guennebaud Date: Tue, 20 Jul 2010 22:43:55 +0200 Subject: [PATCH] fix a strict aliasing issue with gcc 4.3 --- Eigen/src/Core/arch/SSE/Complex.h | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/Eigen/src/Core/arch/SSE/Complex.h b/Eigen/src/Core/arch/SSE/Complex.h index 8c0fd9a7f..036b72d3e 100644 --- a/Eigen/src/Core/arch/SSE/Complex.h +++ b/Eigen/src/Core/arch/SSE/Complex.h @@ -309,12 +309,9 @@ template<> EIGEN_STRONG_INLINE void ei_prefetch >(const std template<> EIGEN_STRONG_INLINE std::complex ei_pfirst(const Packet1cd& a) { -// EIGEN_ALIGN16 double res[2]; -// _mm_store_pd(res, a.v); -// return *(std::complex*)res; - EIGEN_ALIGN16 std::complex res; - ei_pstore(&res, a); - return res; + EIGEN_ALIGN16 double res[2]; + _mm_store_pd(res, a.v); + return *(std::complex*)res; } template<> EIGEN_STRONG_INLINE Packet1cd ei_preverse(const Packet1cd& a) { return a; }