https://issues.dlang.org/show_bug.cgi?id=16105

--- Comment #2 from Don <[email protected]> ---
This isn't a codegen bug per se, but is rather a design bug.

It happens because float.init is a signalling NaN. We should change it to be a
quiet NaN. Using signalling NaNs seemed like a good idea at the time but it
turns out that the hardware support for it just isn't good enough.
Even on x86, Intel and AMD CPUs behave differently. And on other CPUs it is
even worse.
The situation at present is, the intended behaviour is a bit broken on some
platforms, and totally broken on others. It is impossible to fix it.

It is entirely my fault. When Walter released the backend I did this signalling
NaN experiment that I had always wanted to do. I think it was my first compiler
patch ever. It was a mistake. A failed experiment. We need to roll it back.

--

Reply via email to