On 2 Jun 2007, at 02:31, Bruno Haible wrote:
Gary V. Vaughan reported in http://article.gmane.org/gmane.comp.lib.gnulib.bugs/10446 that on HP-UX 11.23:ia64-hp-hpux11.23: 2 gnulib test failures hppa2.0w-hp-hpux11.23: 2 gnulib test failures gmake check-TESTS gmake[4]: Entering directory `/opt/build/m4-1.4.9b/tests' test-lseek.c:76: assertion failed ./test-lseek.sh[14]: 11912 Abort(coredump) FAIL: test-lseek.sh test-vasprintf-posix.c:1238: assertion failed/opt/fsw/bash30/bin/bash: line 1: 11917 ABORT instruction (core dumped) EXEEXT='' EXEEXT='' EXEEXT='' srcdir='.' EXEEXT='' srcdir='.' EXEEXT='' srcdir='.' ${dir}$tstFAIL: test-vasprintf-posixThe test-lseek.sh failure was already fixed on 2007-05-30.
ACK.
The test-vasprintf-posix failure I cannot reproduce with CC="cc - Ae" onthe machine td176.testdrive.hp.com (an ia64-hp-hpux11.23 machine). Can you investigate what is the result of printf %Lf NaN on your machine?
It seems to be a result of the flags we're using. All our *-hpux11.23 builds use:CC=cc CFLAGS="-z +O2 +Onofltacc +Olit=all +Oentrysched +Odataprefetch \
+Onolimit" LDFLAGS="-Wl,+nodefaultrpath"
1) With the native printf, like this:
==================== foo.c ===================
#include <stdio.h>
int main ()
{
static long double zero = 0.0L;
char result[100];
sprintf (result, "%Lf", zero / zero);
printf ("%s\n", result);
return 0;
}
$ cc -z +O2 +Onofltacc +Olit=all +Oentrysched +Odataprefetch +Onolimit \ > foo.c -Wl,+nodefaultrpath -o foo $ ./foo 1.000000 $ cc -Ae foo.c -o foo $ ./foo -nanIt seems +Onofltacc is to blame on hpux11.23, but we've made it a standard flag for compilations on hpux in order for other FLOSS projects to build, correctly; and, in fact, on hpux11.11, hpux11.00 and hpux10.20 +Onofltacc is passed to the compiler, and it doesn't cause the test to fail. From the
manual page:
default
Allows contractions, such as fused
multiply-add (FMA), but disallows any
other floating point optimization that
can result in numerical differences.
limited
Like default, but also allows floating
point optimizations which may affect the
generation and propagation of
infinities, NaNs, and the sign of zero.
relaxed
In addition to the optimizations allowed
by limited, permits optimizations, such
as reordering of expressions, even if
parenthesized, that may affect rounding
error. This is the same as +Onofltacc.
Perhaps that just means there is a compiler bug with +Onofltacc on
hpux11.23?
2) With the gnulib vasprintf, by inserting an fprintf(stderr,...) statementnear test-vasprintf-posix.c:1238 ?
With CC=cc CFLAGS="-z +O2 +Onofltacc +Olit=all +Oentrysched +Odataprefetch \
+Onolimit" LDFLAGS="-Wl,+nodefaultrpath": 1.000000 33 test-vasprintf-posix.c:1239: assertion failed/opt/fsw/bash30/bin/bash: line 1: 12683 ABORT instruction (core dumped) EXEEXT='' EXEEXT='' EXEEXT='' srcdir='.' EXEEXT='' srcdir='.' EXEEXT='' srcdir='.' ${dir}$tst
FAIL: test-vasprintf-posixWith CC=cc CFLAGS="-z +O2 +Olit=all +Oentrysched +Odataprefetch +Onolimit" \
LDFLAGS="-Wl,+nodefaultrpath": -nan 33 -nan 33 PASS: test-vasprintf-posixDo you think the test is at fault here? Or is it an hpux compiler bug? If
the latter, can it be worked around?
Cheers,
Gary
--
())_. Email me: [EMAIL PROTECTED]
( '/ Read my blog: http://blog.azazil.net
/ )= ...and my book: http://sources.redhat.com/autobook
`(_~)_ Join my AGLOCO Network: http://www.agloco.com/r/BBBS7912
PGP.sig
Description: This is a digitally signed message part
