From a6a4395d2075228c2514c38707307be41006f498 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Fri, 10 Jun 2016 23:16:27 +0000 Subject: Fix modf (sNaN) (bug 20240). Various modf implementations return sNaN (both outputs) for sNaN input. In fact they contain code to convert sNaN to qNaN for both outputs, but the way this is done is multiplying by 1.0 (for a wider range of inputs that includes NaNs as well as numbers with exponent large enough to ensure that they are integers), and that multiplication by 1.0 is optimized away by GCC in the absence of -fsignaling-nans, unlike other operations on NaNs used for this purpose that are not no-ops for non-sNaN input. This patch arranges for those files to be built with -fsignaling-nans so that this existing code is effective as intended. Tested for x86_64 and x86. [BZ #20240] * math/Makefile (CFLAGS-s_modf.c): New variable. (CFLAGS-s_modff.c): Likewise. (CFLAGS-s_modfl.c): Likewise. * math/libm-test.inc (modf_test_data): Add sNaN tests. --- ChangeLog | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'ChangeLog') diff --git a/ChangeLog b/ChangeLog index fd2ea8ae08..94caf57615 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2016-06-10 Joseph Myers + + [BZ #20240] + * math/Makefile (CFLAGS-s_modf.c): New variable. + (CFLAGS-s_modff.c): Likewise. + (CFLAGS-s_modfl.c): Likewise. + * math/libm-test.inc (modf_test_data): Add sNaN tests. + 2016-06-09 Carlos O'Donell [BZ #20215] -- cgit v1.2.3