This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/78804] [RX] -m64bit-doubles does not work
- From: "olegendo at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 14 Aug 2017 17:11:20 +0000
- Subject: [Bug target/78804] [RX] -m64bit-doubles does not work
- Auto-submitted: auto-generated
- References: <bug-78804-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78804
--- Comment #20 from Oleg Endo <olegendo at gcc dot gnu.org> ---
(In reply to joseph@codesourcery.com from comment #17)
> Presumably the bit-field issue is RX defaulting to MS bit-field layout
> (rx_is_ms_bitfield_layout suggests making the structure itself packed
> should help).
Yep, the following also fixes the issue.
Index: libgcc/fp-bit.h
===================================================================
--- libgcc/fp-bit.h (revision 251045)
+++ libgcc/fp-bit.h (working copy)
@@ -355,7 +355,7 @@
#endif
#ifdef FLOAT_BIT_ORDER_MISMATCH
- struct
+ struct __attribute__((__packed__))
{
fractype fraction:FRACBITS __attribute__ ((packed));
unsigned int exp:EXPBITS __attribute__ ((packed));
@@ -365,7 +365,7 @@
#endif
#ifdef _DEBUG_BITFLOAT
- struct
+ struct __attribute__((__packed__))
{
unsigned int sign:1 __attribute__ ((packed));
unsigned int exp:EXPBITS __attribute__ ((packed));
@@ -373,7 +373,7 @@
}
bits_big_endian;
- struct
+ struct __attribute__((__packed__))
{
fractype fraction:FRACBITS __attribute__ ((packed));
unsigned int exp:EXPBITS __attribute__ ((packed));
But what's the point of having the bit-field code for little endian, while
there is already shift-and-mask code for big endian?