This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libgcj/50057] [4.7 regression] misalignment of java_exception_header resulted in throwable to be null
- From: "ktietz at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 10 Feb 2012 19:19:56 +0000
- Subject: [Bug libgcj/50057] [4.7 regression] misalignment of java_exception_header resulted in throwable to be null
- Auto-submitted: auto-generated
- References: <bug-50057-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50057
--- Comment #5 from Kai Tietz <ktietz at gcc dot gnu.org> 2012-02-10 19:19:56 UTC ---
Hmm, I assume issue is related to using of -mms-bitfields for 4.7 for
windows-targets.
Does the following patch fix the issue?
Index: exception.cc
===================================================================
--- exception.cc (revision 184105)
+++ exception.cc (working copy)
@@ -33,12 +33,18 @@
}
#include "unwind.h"
+#ifdef __MINGW32__
+__attribute__ ((gcc_struct))
+#endif
struct alignment_test_struct
{
char space;
char end[0] __attribute__((aligned));
};
+#ifdef __MINGW32__
+__attribute__ ((gcc_struct))
+#endif
struct java_exception_header
{
/* Cache handler details between Phase 1 and Phase 2. */