aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/ref.cpp
diff options
context:
space:
mode:
authorGravatar Gael Guennebaud <g.gael@free.fr>2015-11-16 13:33:54 +0100
committerGravatar Gael Guennebaud <g.gael@free.fr>2015-11-16 13:33:54 +0100
commita64156cae5e4fc72a783a14584f1140c5a68a3b3 (patch)
tree09dff9a3992da7d480fc20ec43043d9f955f1b63 /test/ref.cpp
parentbf792f59e3bbfc3b16e9807257a57120f5c5ff04 (diff)
Workaround i387 issue in unit test
Diffstat (limited to 'test/ref.cpp')
-rw-r--r--test/ref.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/test/ref.cpp b/test/ref.cpp
index 1341dfef7..769db0414 100644
--- a/test/ref.cpp
+++ b/test/ref.cpp
@@ -18,6 +18,18 @@
// test Ref.h
+// Deal with i387 extended precision
+#if EIGEN_ARCH_i386 && !(EIGEN_ARCH_x86_64)
+
+#if EIGEN_COMP_GNUC_STRICT && EIGEN_GNUC_AT_LEAST(4,4)
+#pragma GCC optimize ("-ffloat-store")
+#else
+#undef VERIFY_IS_EQUAL
+#define VERIFY_IS_EQUAL(X,Y) VERIFY_IS_APPROX(X,Y)
+#endif
+
+#endif
+
template<typename MatrixType> void ref_matrix(const MatrixType& m)
{
typedef typename MatrixType::Index Index;
@@ -55,7 +67,6 @@ template<typename MatrixType> void ref_matrix(const MatrixType& m)
rm2 = m2.block(i,j,brows,bcols);
VERIFY_IS_EQUAL(m1, m2);
-
ConstRefDynMat rm3 = m1.block(i,j,brows,bcols);
m1.block(i,j,brows,bcols) *= 2;
m2.block(i,j,brows,bcols) *= 2;