Mercurial > hg > octave-kai > gnulib-hg
changeset 15545:251ce56b555a
tests: avoid spurious assertion failure in test-float.c on ppc64
* tests/test-float.c (test_long_double): Comment out an assertion,
LDBL_MIN_EXP <= DBL_MIN_EXP, that is failing at least on PowerPC-64
with gcc-4.4.4.
author | Jim Meyering <meyering@redhat.com> |
---|---|
date | Wed, 31 Aug 2011 17:47:18 +0200 |
parents | c2b10d683d4c |
children | 265302827911 |
files | ChangeLog tests/test-float.c |
diffstat | 2 files changed, 13 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2011-08-31 Jim Meyering <meyering@redhat.com> + tests: avoid spurious assertion failure in test-float.c on ppc64 + * tests/test-float.c (test_long_double): Comment out an assertion, + LDBL_MIN_EXP <= DBL_MIN_EXP, that is failing at least on PowerPC-64 + with gcc-4.4.4. + maint: indent with spaces, not TABs I need to get in the habit of running gnulib's "make check". Both of these would have been caught.
--- a/tests/test-float.c +++ b/tests/test-float.c @@ -298,7 +298,14 @@ /* Check that 'long double' is at least as wide as 'double'. */ ASSERT (LDBL_MANT_DIG >= DBL_MANT_DIG); - ASSERT (LDBL_MIN_EXP <= DBL_MIN_EXP); + + /* Normally, we would also assert this: + ASSERT (LDBL_MIN_EXP <= DBL_MIN_EXP); + but at least on powerpc64 with gcc-4.4.4, it would fail: + $ :|gcc -dD -E -include stddef.h -|grep -E 'L?DBL_MIN_EXP' + #define __DBL_MIN_EXP__ (-1021) + #define __LDBL_MIN_EXP__ (-968) + */ ASSERT (LDBL_MAX_EXP >= DBL_MAX_EXP); /* Check the value of LDBL_DIG. */