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


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.

Andreas.

-- 
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux AG, Maxfeldstraße 5, 90409 Nürnberg, Germany
Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."


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