On 3/23/19 12:24 PM, Sergei Trofimovich wrote:
> Here denormalization conversion has a few bugs:
> - significand (abs_arg) has 32-bit unsigned wraparound in
> ret |= abs_arg << (shift + 29);
> - significand does not drop explicit leading '1' in denorm
> 'float' when converting to normalized '
On Sat, Mar 23, 2019 at 10:24:11PM +, Sergei Trofimovich wrote:
> The bug is initially discovered in GHC test suite. Here is minimal reproducer:
>
> ```c
>
> int main() {
> volatile float f;
> volatile double d;
>
> *(volatile uint32_t*)&f = 0xc0de;
> d = f;
> printf("f
The bug is initially discovered in GHC test suite. Here is minimal reproducer:
```c
int main() {
volatile float f;
volatile double d;
*(volatile uint32_t*)&f = 0xc0de;
d = f;
printf("f = %#x\n", *(volatile uint32_t*)&f);
printf("d = %#llx (expect 0x37981bc0)\n",