This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Unreviewed 3.4 patch
Andreas Schwab <schwab@suse.de> writes:
> Richard Sandiford <rsandifo@redhat.com> writes:
>
>> I didn't guard the other test case since I would have expected:
>>
>> + x = 0x1.fffffffffffff8p1022L;
>> + x *= 2;
>> + y = 0x1.fffffffffffff8p1023L;
>> + if (memcmp (&x, &y, sizeof (x)) != 0)
>> + abort ();
>> + exit (0);
>>
>> to pass for any floating-point type.
>
> It doesn't pass on ia64-linux. In general you can't expect two variables
> to have the same bitwise contents even if their values are equal because
> of padding. On ia64-linux long double is a 16 byte type, but 4 bytes are
> padding, and when storing x back to memory some bits of the padding get
> set and it is no longer bitwise identical to y.
Drat. Sorry about that. Floating-point equality isn't enough
to tickle the bug, so should I just make the test mips-specific?
Or remove it entirely?
Richard