diff options
author | Mark Dickinson <dickinsm@gmail.com> | 2010-07-18 16:01:36 (GMT) |
---|---|---|
committer | Mark Dickinson <dickinsm@gmail.com> | 2010-07-18 16:01:36 (GMT) |
commit | c95111995bc630a90687c5a4dc191332b1843403 (patch) | |
tree | 6784fcc85079e99b79f736c50a9084c2adad432b /configure.in | |
parent | d319ad5c1a7478baca54bd00650a3fa79e970e80 (diff) | |
download | cpython-c95111995bc630a90687c5a4dc191332b1843403.zip cpython-c95111995bc630a90687c5a4dc191332b1843403.tar.gz cpython-c95111995bc630a90687c5a4dc191332b1843403.tar.bz2 |
Add configure check for a bug with gcc soft floating-point and subnormals, to help debug issue 8265.
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/configure.in b/configure.in index 4a7e99a..69cd0e3 100644 --- a/configure.in +++ b/configure.in @@ -3334,6 +3334,26 @@ then in ARM mixed-endian order (byte order 45670123)]) fi +# Temporary check for a floating-point bug that appeared on ARM. +AC_MSG_CHECKING(for buggy subnormal floating-point) +AC_CACHE_VAL(ac_cv_buggy_subnormal, [ +AC_RUN_IFELSE([AC_LANG_SOURCE([[ +int main() { + double MIN = 2.2250738585072014e-308; /* 2**-1022 */ + double TINY = 4.9406564584124654e-324; /* 2**-1074 */ + double TRIPLE_TINY = 1.4821969375237396e-323; /* 3 * TINY */ + + double diff = MIN - TRIPLE_TINY; + double expected_diff = 2.2250738585071999e-308; + + return !(diff == expected_diff); +} +]])], +[ac_cv_buggy_subnormal=no], +[ac_cv_buggy_subnormal=yes], +[ac_cv_buggy_subnormal=no])]) +AC_MSG_RESULT($ac_cv_buggy_subnormal) + # The short float repr introduced in Python 3.1 requires the # correctly-rounded string <-> double conversion functions from # Python/dtoa.c, which in turn require that the FPU uses 53-bit |