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]

[patch libgcc]: Fix float128 soft-float for mingw targets


Hi,

by recent tests in gcc.target/i386 I noticed that testcase
float128-2.c failed on executation.  This failure is caused by
incompatible bitfield-structure definition in soft-fp/quad.h for
enabled ms-bitfields layout.

Patch marks those structures to be 'gcc_struct' for mingw targets.

ChangeLog

2012-02-27  Kai Tietz  <ktietz@redhat.com>

	* soft-fp/quad.h: Mark bitfield-structures as gcc_struct.

Regression tested for i686-w64-mingw32, x86_64-w64-mingw32, and
x86_64-unknown-linux-gnu for all languages (including Ada + Obj-C++).
Ok for apply?

Regards,
Kai

Index: soft-fp/quad.h
===================================================================
--- soft-fp/quad.h	(revision 184486)
+++ soft-fp/quad.h	(working copy)
@@ -67,7 +67,11 @@
 union _FP_UNION_Q
 {
    TFtype flt;
-   struct
+   struct
+#ifdef __MINGW32__
+  /* Make sure we are using gnu-style bitfield handling.  */
+  __attribute__ ((gcc_struct))
+#endif
    {
 #if __BYTE_ORDER == __BIG_ENDIAN
       unsigned sign : 1;
@@ -174,7 +178,12 @@
   struct {
     _FP_W_TYPE a, b;
   } longs;
-  struct {
+  struct
+#ifdef __MINGW32__
+  /* Make sure we are using gnu-style bitfield handling.  */
+  __attribute__ ((gcc_struct))
+#endif
+  {
 #if __BYTE_ORDER == __BIG_ENDIAN
     unsigned sign    : 1;
     unsigned exp     : _FP_EXPBITS_Q;


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