GCC 12 miscompiles libm

Joseph Myers joseph@codesourcery.com
Mon Dec 20 22:11:59 GMT 2021


On Mon, 20 Dec 2021, Joseph Myers wrote:

> In the cosf case, I suspect
> 
>   if (abstop12 (y) < abstop12 (pio4))
> 
> where abstop12 takes a float argument, but pio4 is static const double.  
> I don't think that pio4 definition is ever used in arithmetic, only in 
> calls to abstop12, so changing it to a static const float should be fine.

And for the Bessel function cases, e.g. math/w_j0f_compat.c has references 
to (float) X_TLOSS which should become references to a corresponding 
constant of type float.

-- 
Joseph S. Myers
joseph@codesourcery.com


More information about the Libc-alpha mailing list