diff options
author | Gael Guennebaud <g.gael@free.fr> | 2015-12-10 21:33:43 +0100 |
---|---|---|
committer | Gael Guennebaud <g.gael@free.fr> | 2015-12-10 21:33:43 +0100 |
commit | 46d2f6cd78aa752c55099072217993af81f70779 (patch) | |
tree | a6cda80c854cb8885f58e415c282e216739d6760 /test | |
parent | 7ad1aaec1db2dbf1abfc19a5bb62626653fa48fb (diff) |
Workaround gcc issue with -O3 and the i387 FPU.
Diffstat (limited to 'test')
-rw-r--r-- | test/packetmath.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/test/packetmath.cpp b/test/packetmath.cpp index b6616ac5e..f1826f0ef 100644 --- a/test/packetmath.cpp +++ b/test/packetmath.cpp @@ -18,7 +18,9 @@ template<typename T> T negate(const T& x) { return -x; } } } -template<typename Scalar> bool isApproxAbs(const Scalar& a, const Scalar& b, const typename NumTraits<Scalar>::Real& refvalue) +// NOTE: we disbale inlining for this function to workaround a GCC issue when using -O3 and the i387 FPU. +template<typename Scalar> EIGEN_DONT_INLINE +bool isApproxAbs(const Scalar& a, const Scalar& b, const typename NumTraits<Scalar>::Real& refvalue) { return internal::isMuchSmallerThan(a-b, refvalue); } |