bug-gnulib
[Top][All Lists]
Advanced

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

Re: test-isinf compiled by gcc-5.3.1 fails on ppc64le


From: Bruno Haible
Subject: Re: test-isinf compiled by gcc-5.3.1 fails on ppc64le
Date: Sun, 13 Mar 2016 13:51:27 +0100
User-agent: KMail/4.8.5 (Linux/3.8.0-44-generic; KDE/4.8.5; x86_64; ; )

Paul Eggert wrote:
> Why is the Gnulib code triggering at all? It's supposed to be used only if 
> <float.h> doesn't work. What isn't working about <float.h>?

Gnulib is overriding the value of LDBL_MAX also on Linux/PowerPC platforms.
The relevant commit of mine:
http://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=commit;h=c65d65a81e9d66960ae7ce5abe5069d5b7338ed2
It was needed to fix a 'test-float' failure on Linux/PowerPC with GCC 4.4.

Michel Normand points us to
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70117
which says "with recent glibc changing isinf to use GCC builtins we end up
with the following failing test". This can indeed be the cause why the
isinf test is failing. But test-float does not use isinf(), in only uses
the macros from <float.h> and the arithmetic provided by the compiler.
So, if you revert said gnulib commit, you may well get a test-isinf that
succeeds but a test-float that fails.

I think the problem is that float arithmetic is defined by GCC and glibc
together, and none of them has consistency unit tests like gnulib has.
GCC doesn't have them, because they are not providing <float.h>,
and Glibc doesn't have them, presumably because they think it's outside
their domain.

I think one of the following actions would be useful to help with this
situation:
  (a) Add gnulib's test-float and test-isinf to the glibc test suite.
  (b) Rewrite gnulib's test-float and test-isinf to use __builtin_*
      functions and macros instead of <float.h>, and contribute the
      resulting tests to the GCC test suite.

Bruno




reply via email to

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