[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [m4-1.4.11] build feedback
From: |
Bruno Haible |
Subject: |
Re: [m4-1.4.11] build feedback |
Date: |
Sat, 12 Apr 2008 18:34:47 +0200 |
User-agent: |
KMail/1.5.4 |
Eric Blake wrote, citing Nelson Beebe:
> | ------------------------------------------------------------------------
> | Machinetype: SGI O2 R10000-SC (150 MHz); IRIX 6.5
> | Configure environment: CC=c89 CXX=CC CFLAGS=-I/usr/local/include
> CXXFLAGS=-I/usr/local/include LDFLAGS=-Wl,-rpath,/usr/local/libn32
> |
> | test-vasprintf-posix.c:1309: assertion failed
> | /bin/sh[9]: 1710567 Abort(coredump)
> | FAIL: test-vasprintf-posix
Seems there is a confusion about whether this platform has a -0.0 or not...
I fear you need to help in debugging this: I did a full check of gnulib
on the IRIX 6.5 machine I have access to, with CC=cc, and got no failures
in this area.
> | ------------------------------------------------------------------------
> | Machinetype: SGI O2 R10000-SC (150 MHz); IRIX 6.5
> |
> | configure without options or environment variables
> |
> | test-frexpl.c:78: assertion failed
> | /bin/sh[9]: 1798891 Abort(coredump)
> | FAIL: test-frexpl
> |
> | test-isnanl.h:56: assertion failed
> | /bin/sh[9]: 1583655 Abort(coredump)
> | FAIL: test-isnanl-nolibm
> |
> | test-vasprintf-posix.c:549: assertion failed
> | /bin/sh[9]: 1785979 Abort(coredump)
> | FAIL: test-vasprintf-posix
Seems isnanl doesn't work but only if you use gcc instead of cc. This is
due to the autoconf test.
2008-04-12 Bruno Haible <address@hidden>
* m4/isnanf.m4 (gl_ISNANF_WORKS): Add a test for a special NaN.
Reported by Nelson H. F. Beebe <address@hidden>.
*** m4/isnanf.m4.orig 2008-04-12 18:29:58.000000000 +0200
--- m4/isnanf.m4 2008-04-12 18:27:18.000000000 +0200
***************
*** 1,4 ****
! # isnanf.m4 serial 5
dnl Copyright (C) 2007-2008 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
--- 1,4 ----
! # isnanf.m4 serial 6
dnl Copyright (C) 2007-2008 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
***************
*** 47,58 ****
])
])
! dnl Test whether isnanf() recognizes a NaN (this fails on IRIX 6.5) and
rejects
! dnl Infinity (this fails on Solaris 2.5.1).
AC_DEFUN([gl_ISNANF_WORKS],
[
AC_REQUIRE([AC_PROG_CC])
AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
AC_CACHE_CHECK([whether isnan(float) works], [gl_cv_func_isnanf_works],
[
AC_TRY_RUN([
--- 47,60 ----
])
])
! dnl Test whether isnanf() rejects Infinity (this fails on Solaris 2.5.1),
! dnl recognizes a NaN (this fails on IRIX 6.5 with cc), and recognizes a NaN
! dnl with in-memory representation 0x7fbfffff (this fails on IRIX 6.5).
AC_DEFUN([gl_ISNANF_WORKS],
[
AC_REQUIRE([AC_PROG_CC])
AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+ AC_REQUIRE([gl_FLOAT_EXPONENT_LOCATION])
AC_CACHE_CHECK([whether isnan(float) works], [gl_cv_func_isnanf_works],
[
AC_TRY_RUN([
***************
*** 75,86 ****
#else
# define NaN() (0.0f / 0.0f)
#endif
int main()
{
! if (!isnanf (NaN ()))
! return 1;
if (isnanf (1.0f / 0.0f))
return 1;
return 0;
}], [gl_cv_func_isnanf_works=yes], [gl_cv_func_isnanf_works=no],
[case "$host_os" in
--- 77,110 ----
#else
# define NaN() (0.0f / 0.0f)
#endif
+ #define NWORDS \
+ ((sizeof (float) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
+ typedef union { unsigned int word[NWORDS]; float value; } memory_float;
int main()
{
! memory_float m;
!
if (isnanf (1.0f / 0.0f))
return 1;
+
+ if (!isnanf (NaN ()))
+ return 1;
+
+ #if defined FLT_EXPBIT0_WORD && defined FLT_EXPBIT0_BIT
+ /* The isnanf function should be immune against changes in the sign bit and
+ in the mantissa bits. The xor operation twiddles a bit that can only be
+ a sign bit or a mantissa bit. */
+ if (FLT_EXPBIT0_WORD == 0 && FLT_EXPBIT0_BIT > 0)
+ {
+ m.value = NaN ();
+ /* Set the bits below the exponent to 01111...111. */
+ m.word[0] &= -1U << FLT_EXPBIT0_BIT;
+ m.word[0] |= 1U << (FLT_EXPBIT0_BIT - 1) - 1;
+ if (!isnanf (m.value))
+ return 1;
+ }
+ #endif
+
return 0;
}], [gl_cv_func_isnanf_works=yes], [gl_cv_func_isnanf_works=no],
[case "$host_os" in
- [m4-1.4.11] build feedback, Nelson H. F. Beebe, 2008/04/03
- Re: [m4-1.4.11] build feedback, Eric Blake, 2008/04/03
- Re: [m4-1.4.11] build feedback, Bruno Haible, 2008/04/04
- fseek failure output [was: [m4-1.4.11] build feedback], Eric Blake, 2008/04/04
- Re: [m4-1.4.11] build feedback,
Bruno Haible <=
- Re: [m4-1.4.11] build feedback, Tom G. Christensen, 2008/04/13
- Re: [m4-1.4.11] build feedback, Bruno Haible, 2008/04/13
- Re: [m4-1.4.11] build feedback, Tom G. Christensen, 2008/04/13
- Re: [m4-1.4.11] build feedback, Bruno Haible, 2008/04/13
- Re: [m4-1.4.11] build feedback, Tom G. Christensen, 2008/04/13
- Re: [m4-1.4.11] build feedback, Bruno Haible, 2008/04/13
- Re: [m4-1.4.11] build feedback, Tom G. Christensen, 2008/04/14