tests/mpq/t-get_d.c failure on m68k-linux

Richard Henderson rth at redhat.com
Mon Feb 18 22:18:08 CET 2013

On 02/18/2013 12:43 PM, Niels Möller wrote:
> Maybe I'm naive, but does it help to simple change
>   double d, d2, nd, dd;
> at the top of that function to
>   volatile double d, d2, nd, dd;
> I mean, it shouldn't make much difference if excess precision is
> discarded before or after it is passed as a return value from my_ldexp,
> should it?

Both would still function correctly.  I simply have a preference for
limiting (and explicitly marking) the places that need to drop excess

Glibc has a macro like

#define math_force_round(x) (x)
#define math_force_round(x) __asm("" : "+m"(x))

which forces the value to memory (discarding extra precision) only if
the host is affected by excess precision.


More information about the gmp-bugs mailing list