From: Bruno Haible Date: Sat, 4 Nov 2023 13:18:28 +0000 (+0100) Subject: fenv-rounding: Avoid a test failure on NetBSD/sparc64. X-Git-Tag: v1.0~657 X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=4650354bcfec36dd8b39b996ee0659dd669214c4;p=gnulib.git fenv-rounding: Avoid a test failure on NetBSD/sparc64. * tests/test-fenv-round.c (test_towardzero, test_upward, test_downward): Skip the 'long double' tests on NetBSD/sparc64. * doc/posix-functions/fesetround.texi: Mention the problem with 'long double' operations on some platforms. --- diff --git a/ChangeLog b/ChangeLog index 516e59586d..355ad2396d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2023-11-04 Bruno Haible + + fenv-rounding: Avoid a test failure on NetBSD/sparc64. + * tests/test-fenv-round.c (test_towardzero, test_upward, test_downward): + Skip the 'long double' tests on NetBSD/sparc64. + * doc/posix-functions/fesetround.texi: Mention the problem with + 'long double' operations on some platforms. + 2023-11-04 Bruno Haible fenv-rounding: Improve code for MSVC. diff --git a/doc/posix-functions/fesetround.texi b/doc/posix-functions/fesetround.texi index f0c74c3467..73d6c034fa 100644 --- a/doc/posix-functions/fesetround.texi +++ b/doc/posix-functions/fesetround.texi @@ -18,4 +18,7 @@ MSVC 14. Portability problems not fixed by Gnulib: @itemize +@item +The rounding mode has no effect on @code{long double} operations on some platforms: +FreeBSD/arm64, NetBSD/sparc64. @end itemize diff --git a/tests/test-fenv-round.c b/tests/test-fenv-round.c index aba783cc79..b697fb1301 100644 --- a/tests/test-fenv-round.c +++ b/tests/test-fenv-round.c @@ -45,7 +45,7 @@ test_towardzero () a = -1; b = 3; q = a / b; p = b * q; ASSERT (p > a); } -#if !(defined __FreeBSD__ && defined __aarch64__) +#if !((defined __FreeBSD__ && defined __aarch64__) || (defined __NetBSD__ && defined __sparcv9 /* sparc64 */)) { long double volatile a, b, q, p; @@ -80,7 +80,7 @@ test_upward () a = -1; b = 3; q = a / b; p = b * q; ASSERT (p > a); } -#if !(defined __FreeBSD__ && defined __aarch64__) +#if !((defined __FreeBSD__ && defined __aarch64__) || (defined __NetBSD__ && defined __sparcv9 /* sparc64 */)) { long double volatile a, b, q, p; @@ -115,7 +115,7 @@ test_downward () a = -1; b = 3; q = a / b; p = b * q; ASSERT (p < a); } -#if !(defined __FreeBSD__ && defined __aarch64__) +#if !((defined __FreeBSD__ && defined __aarch64__) || (defined __NetBSD__ && defined __sparcv9 /* sparc64 */)) { long double volatile a, b, q, p;