cpython: e3008318f76b (original) (raw)
Mercurial > cpython
changeset 97367:e3008318f76b 3.5
Merge: #21167: Fix definition of NAN when ICC used without -fp-model strict. [#21167]
R David Murray rdmurray@bitdance.com | |
---|---|
date | Thu, 13 Aug 2015 10:04:21 -0400 |
parents | 51d00482d403(current diff)5e71a489f01d(diff) |
children | 1dd4f473c627 2a41fb63c095 |
files | Misc/ACKS Misc/NEWS |
diffstat | 3 files changed, 27 insertions(+), 1 deletions(-)[+] [-] Include/pymath.h 24 Misc/ACKS 1 Misc/NEWS 3 |
line wrap: on
line diff
--- a/Include/pymath.h +++ b/Include/pymath.h @@ -150,7 +150,29 @@ PyAPI_FUNC(void) _Py_set_387controlword(
#if !defined(Py_NAN) && !defined(Py_NO_NAN) -#define Py_NAN (Py_HUGE_VAL * 0.) +#if !defined(__INTEL_COMPILER)
- #if defined(ICC_NAN_STRICT)
#pragma float_control(push)[](#l1.12)
#pragma float_control(precise, on)[](#l1.13)
#pragma float_control(except, on)[](#l1.14)
#if defined(_MSC_VER)[](#l1.15)
__declspec(noinline)[](#l1.16)
#else /* Linux */[](#l1.17)
__attribute__((noinline))[](#l1.18)
#endif /* _MSC_VER */[](#l1.19)
static double __icc_nan()[](#l1.20)
{[](#l1.21)
return sqrt(-1.0);[](#l1.22)
}[](#l1.23)
#pragma float_control (pop)[](#l1.24)
#define Py_NAN __icc_nan()[](#l1.25)
- #else /* ICC_NAN_RELAXED as default for Intel Compiler */
static union { unsigned char buf[8]; double __icc_nan; } __nan_store = {0,0,0,0,0,0,0xf8,0x7f};[](#l1.27)
#define Py_NAN (__nan_store.__icc_nan)[](#l1.28)
- #endif /* ICC_NAN_STRICT */
+#endif /* __INTEL_COMPILER / #endif / Py_OVERFLOWED(X)
--- a/Misc/ACKS +++ b/Misc/ACKS @@ -594,6 +594,7 @@ Gregor Hoffleit Chris Hoffman Stefan Hoffmeister Albert Hofkamp +Chris Hogan Tomas Hoger Jonathan Hogg Kamilla Holanda
--- a/Misc/NEWS +++ b/Misc/NEWS @@ -10,6 +10,9 @@ Release date: 2015-08-23 Core and Builtins ----------------- +- Issue #21167: NAN operations are now handled correctly when python is