Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/tests/usr.bin/xlint/lint1 tests/lint: skip test for floating...



details:   https://anonhg.NetBSD.org/src/rev/453afa9ac8be
branches:  trunk
changeset: 1022342:453afa9ac8be
user:      rillig <rillig%NetBSD.org@localhost>
date:      Tue Jul 13 19:11:35 2021 +0000

description:
tests/lint: skip test for floating point overflow on alpha

On alpha and a few other platforms (see t_integration.sh), 'long double'
has 128 bit, which under IEEE 754 rules means a decimal exponent of up
to 4932.

diffstat:

 tests/usr.bin/xlint/lint1/msg_142.c   |  12 ++++++++++--
 tests/usr.bin/xlint/lint1/msg_142.exp |   4 ++--
 2 files changed, 12 insertions(+), 4 deletions(-)

diffs (28 lines):

diff -r 78fd62907ac8 -r 453afa9ac8be tests/usr.bin/xlint/lint1/msg_142.c
--- a/tests/usr.bin/xlint/lint1/msg_142.c       Tue Jul 13 18:50:16 2021 +0000
+++ b/tests/usr.bin/xlint/lint1/msg_142.c       Tue Jul 13 19:11:35 2021 +0000
@@ -1,6 +1,14 @@
-/*     $NetBSD: msg_142.c,v 1.4 2021/04/05 01:35:34 rillig Exp $       */
+/*     $NetBSD: msg_142.c,v 1.5 2021/07/13 19:11:35 rillig Exp $       */
 # 3 "msg_142.c"
 
 // Test for message: floating point overflow detected, op %s [142]
 
-double dbl = 1e100 * 1e100 * 1e100 * 1e100 * 1e100;    /* expect: 142 *//* expect: 142 */
+/* lint1-only-if ldbl-64 */
+/*
+ * For 96-bit and 128-bit floating point numbers, a different number of
+ * multipliers is needed to produce an overflow.
+ */
+
+/* expect+2: warning: floating point overflow detected, op * [142] */
+/* expect+1: warning: floating point overflow detected, op * [142] */
+double dbl = 1e100 * 1e100 * 1e100 * 1e100 * 1e100;
diff -r 78fd62907ac8 -r 453afa9ac8be tests/usr.bin/xlint/lint1/msg_142.exp
--- a/tests/usr.bin/xlint/lint1/msg_142.exp     Tue Jul 13 18:50:16 2021 +0000
+++ b/tests/usr.bin/xlint/lint1/msg_142.exp     Tue Jul 13 19:11:35 2021 +0000
@@ -1,2 +1,2 @@
-msg_142.c(6): warning: floating point overflow detected, op * [142]
-msg_142.c(6): warning: floating point overflow detected, op * [142]
+msg_142.c(14): warning: floating point overflow detected, op * [142]
+msg_142.c(14): warning: floating point overflow detected, op * [142]



Home | Main Index | Thread Index | Old Index