bug-gnulib
[Top][All Lists]
Advanced

[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: Sun, 3 Jun 2007 14:53:22 +0100

Hi Bruno,

[[Cc:ing Albert Chin: Albert, why do we need +Onofltacc in the standard hpux11.23
  flags, when it clearly causes NaN regressions?]]

On 3 Jun 2007, at 01:48, Bruno Haible wrote:

Gary V. Vaughan wrote in
  http://lists.gnu.org/archive/html/bug-gnulib/2007-06/msg00005.html
[For some reason, I can see your last 3 mails on gmane and on lists.gnu.org,
but they don't came into my mailbox. And I have no spam filter.]

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" \
LDFLAGS="-Wl,+nodefaultrpath":

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

This makes it pretty clear that +Onofltacc is the culprit.

Do you think the test is at fault here?

No; dividing zero by zero *must* give a NaN according to IEEE 754. This is not the kind of "undefined behaviour" that may be optimized randomly by
the compilers.

Or is it an hpux compiler bug?

Whether it's an HP-UX compiler bug or whether it's you who are willfully choosing a non-IEEE-754-compliant compiler by using the option +Onofltacc, depends on the HP compiler's documentation. I can not judge it by the small
snippet you posted.

The fact that it breaks this test only on hpux11.23 when the same flags do not break it on hpux11.11 and hpux11.00 makes me think it is a compiler bug.

we've made it a standard flag for compilations on hpux in order for
other FLOSS projects to build correctly

It sounds surprising that some projects _require_ a particular optimization in order to build correctly?! But it any case, I'm more inclined to adapt
source code so that it compiles with default flags, more than for some
pretty aggressive vendor-specific optimization flags. (Here for HP- UX cc
I consider "cc -Ae" the default.)

ACK.  Thanks for your input.

Cheers,
        Gary
--
  ())_.              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]