This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]