From: Bruno Haible <bruno@clisp.org>
To: bug-gnulib@gnu.org
Subject: fenv-rounding: Avoid a test failure on OpenBSD/arm64
Date: Fri, 19 Jan 2024 00:58:17 +0100 [thread overview]
Message-ID: <34810978.ATrlOLLGV9@nimes> (raw)
On OpenBSD 7.4/arm64, I'm seeing this test failure:
$ ./test-fenv-round
../../gltests/test-fenv-round.c:53: assertion 'p < a' failed
Abort trap (core dumped)
As usual, the problem is that the soft-float functions
(__divtf3, __eqtf2, __multf3) ignore the current rounding mode.
This patch avoids the test failure:
2024-01-18 Bruno Haible <bruno@clisp.org>
fenv-rounding: Avoid a test failure on OpenBSD/arm64.
* tests/test-fenv-round.c (test_towardzero, test_upward, test_downward):
Skip the 'long double' tests on OpenBSD/arm64.
* doc/posix-functions/fesetround.texi: Update platforms list.
diff --git a/doc/posix-functions/fesetround.texi b/doc/posix-functions/fesetround.texi
index bb06c4192a..56c8876291 100644
--- a/doc/posix-functions/fesetround.texi
+++ b/doc/posix-functions/fesetround.texi
@@ -20,5 +20,5 @@
@itemize
@item
The rounding mode has no effect on @code{long double} operations on some platforms:
-FreeBSD/arm64, NetBSD/sparc64, OpenBSD/mips64.
+FreeBSD/arm64, NetBSD/sparc64, OpenBSD/arm64, OpenBSD/mips64.
@end itemize
diff --git a/tests/test-fenv-round.c b/tests/test-fenv-round.c
index db2cd01c71..ce56048e51 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__) || (defined __NetBSD__ && defined __sparcv9 /* sparc64 */) || (defined __OpenBSD__ && defined __mips64))
+#if !(((defined __FreeBSD__ || defined __OpenBSD__) && defined __aarch64__) || (defined __NetBSD__ && defined __sparcv9 /* sparc64 */) || (defined __OpenBSD__ && defined __mips64))
{
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__) || (defined __NetBSD__ && defined __sparcv9 /* sparc64 */) || (defined __OpenBSD__ && defined __mips64))
+#if !(((defined __FreeBSD__ || defined __OpenBSD__) && defined __aarch64__) || (defined __NetBSD__ && defined __sparcv9 /* sparc64 */) || (defined __OpenBSD__ && defined __mips64))
{
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__) || (defined __NetBSD__ && defined __sparcv9 /* sparc64 */) || (defined __OpenBSD__ && defined __mips64))
+#if !(((defined __FreeBSD__ || defined __OpenBSD__) && defined __aarch64__) || (defined __NetBSD__ && defined __sparcv9 /* sparc64 */) || (defined __OpenBSD__ && defined __mips64))
{
long double volatile a, b, q, p;
reply other threads:[~2024-01-18 23:58 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://lists.gnu.org/mailman/listinfo/bug-gnulib
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=34810978.ATrlOLLGV9@nimes \
--to=bruno@clisp.org \
--cc=bug-gnulib@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).