diff --git a/test/stable_norm.cpp b/test/stable_norm.cpp index 4480c5203..d78496fc3 100644 --- a/test/stable_norm.cpp +++ b/test/stable_norm.cpp @@ -29,9 +29,12 @@ template bool isNotNaN(const T& x) return x==x; } +// workaround aggressive optimization in ICC +template EIGEN_DONT_INLINE T sub(T a, T b) { return a - b; } + template bool isFinite(const T& x) { - return isNotNaN(x-x); + return isNotNaN(sub(x,x)); } template EIGEN_DONT_INLINE T copy(const T& x)