Unreviewed 3.4 patch

Richard Sandiford rsandifo@redhat.com
Sat Feb 21 13:45:00 GMT 2004


Richard Sandiford <rsandifo@redhat.com> writes:
> 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?

Roger said he was OK with restricting it to mips*-*-irix6*
so I installed the patch below to head & 3.4 branch.

Richard


	* gcc.c-torture/execute/20040208-2.x: New file.

*** /dev/null	Tue Jun 17 23:06:41 2003
--- gcc.c-torture/execute/20040208-2.x	Mon Feb 16 08:41:08 2004
***************
*** 0 ****
--- 1 ----
+ return [expr ![istarget mips*-*-irix6*]]



More information about the Gcc-patches mailing list