[Bug libgcc/116017] libgcc/riscv/softfp: Fix loss of sign when truncating NaN values
pinskia at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Sat Jul 20 19:31:56 GMT 2024
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116017
--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Can you test also:
```
#include <stdio.h>
#include <math.h>
int main(void)
{
volatile double d;
volatile float f;
d = (double) NAN;
d = -d;
f = d;
printf("%a\n", d);
// Note there is an implicit conversion to double here ...
printf("%a\n", f);
volatile double d1;
d1 = f;
printf("%a\n", d1);
return signbit(d) != signbit(ld);
}
```
More information about the Gcc-bugs
mailing list