[Top][All Lists]

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

Re: m4-1.4.9b on HP-UX 11

From: Gary V. Vaughan
Subject: Re: m4-1.4.9b on HP-UX 11
Date: Sat, 2 Jun 2007 19:03:09 +0100

On 2 Jun 2007, at 02:31, Bruno Haible wrote:
Gary V. Vaughan reported in
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}$tst
  FAIL: test-vasprintf-posix

The test-lseek.sh failure was already fixed on 2007-05-30.


The test-vasprintf-posix failure I cannot reproduce with CC="cc - Ae" on
the 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
$ cc -Ae foo.c -o foo
$ ./foo

It 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:

    Allows contractions, such as fused
    multiply-add (FMA), but disallows any
    other floating point optimization that
    can result in numerical differences.

    Like default, but also allows floating
    point optimizations which may affect the
    generation and propagation of
    infinities, NaNs, and the sign of zero.

    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,...) statement
near 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-posix

With CC=cc CFLAGS="-z +O2 +Olit=all +Oentrysched +Odataprefetch +Onolimit" \

  -nan 33
  -nan 33
  PASS: test-vasprintf-posix

Do you think the test is at fault here? Or is it an hpux compiler bug? If
the latter, can it be worked around?

  ())_.              Email me: address@hidden
  ( '/           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

Attachment: PGP.sig
Description: This is a digitally signed message part

reply via email to

[Prev in Thread] Current Thread [Next in Thread]