NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
port-vax/59261: t_fpclassify tests are failing
>Number: 59261
>Category: port-vax
>Synopsis: t_fpclassify tests are failing
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: port-vax-maintainer
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Mon Apr 07 00:00:00 +0000 2025
>Originator: Taylor R Campbell
>Release: current
>Organization:
The VaxBSD Subnormalization
>Environment:
>Description:
Various t_fpclassify tests are failing related to subnormals, which VAX doesn't have (https://nssdc.gsfc.nasa.gov/nssdc/formats/VAXFloatingPoint.htm, https://pubs.usgs.gov/of/2005/1424/of2005-1424_v1.2.pdf):
*** Check failed: /tmp/build/2025.04.04.21.52.19-vax/src/tests/lib/libc/gen/t_fpclassify.c:145: fpclassify(d1) != FP_SUBNORMAL: [1] fpclassify(0x0p+0)=4 FP_SUBNORMAL=3
*** Check failed: /tmp/build/2025.04.04.21.52.19-vax/src/tests/lib/libc/gen/t_fpclassify.c:148: [1] d1=0x0p+0 d0=0x8p-131
*** Check failed: /tmp/build/2025.04.04.21.52.19-vax/src/tests/lib/libc/gen/t_fpclassify.c:166: e != DBL_MIN_EXP - i: [1] frexp(0x0p+0) returned normalized 0x0p+0, exponent 0; expected normalized 0x8p-4, exponent -128
*** Check failed: /tmp/build/2025.04.04.21.52.19-vax/src/tests/lib/libc/gen/t_fpclassify.c:170: f != 0.5: [1] frexp(0x0p+0) returned normalized 0x0p+0, exponent 0; expected normalized 0x8p-4, exponent -128
*** Check failed: /tmp/build/2025.04.04.21.52.19-vax/src/tests/lib/libc/gen/t_fpclassify.c:145: fpclassify(d1) != FP_SUBNORMAL: [2] fpclassify(0x0p+0)=4 FP_SUBNORMAL=3
...
https://releng.netbsd.org/b5reports/vax/2025/2025.04.04.21.52.19/test.html#lib_libc_gen_t_fpclassify_fpclassify_double
>How-To-Repeat:
cd /usr/tests/lib/libc
atf-run t_fpclassify | atf-report
>Fix:
Looks like this happens because gcc defines __*_HAS_DENORM__ to zero, instead of leaving them undefined:
$ ~/netbsd/current/obj.vax/tooldir/bin/vax--netbsdelf-gcc -dM -x c -E /dev/null | grep DENORM | sort -u
#define __DBL_DENORM_MIN__ ((double)2.93873587705571877e-39L)
#define __DBL_HAS_DENORM__ 0
#define __FLT_DENORM_MIN__ 2.93873587705571877e-39F
#define __FLT_HAS_DENORM__ 0
#define __LDBL_DENORM_MIN__ 2.93873587705571877e-39L
#define __LDBL_HAS_DENORM__ 0
Change
#ifdef __*_HAS_DENORM__
to
#if __*_HAS_DENORM__
everywhere.
Home |
Main Index |
Thread Index |
Old Index