Hi Helmut,

On 28.08.21 13:53, Helmut Grohne wrote:
> The issue is with the detection of the long double epsilon on powerpc
> architectures. m4/floatparam.m4' macro CL_FLOATPARAM_CROSS attempts to
> deduce the minimal value that can be added to 1 using compile time
> bisection. That works, because gcc does constant folding of floating
> point numbers, except when it does not not powerpc architectures. There
> is a long standing gcc bug
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=19779.
> 
> Would there be any chance to use gcc constants such as LDBL_EPSILON for
> this case (even opportunistically)?
> 
> In any case, the current implementation is very bad, because the while
> loop never finishes as every compilation attempt fails on the supposedly
> non-constant expression. At minimum, there should be a bound on the
> number of iterations.

How can I reproduce this?

On my bullseye setup, this works:
$ ./configure --host=powerpc64le-linux-gnu --disable-shared
$ make
$ qemu-ppc64le -L /usr/powerpc64le-linux-gnu ./tests/exam
Tests passed.

It surely produces the expected floatparam.h file, with
long_double_mant_bits set to 106.

  -richy.
-- 
Richard B. Kreckel
<https://in.terlu.de/~kreckel/>

Reply via email to