This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug ada/49084] [4.7 regression] bootstrap failure with Ada enabled
- From: "cestrauss at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sat, 10 Dec 2011 23:03:13 +0000
- Subject: [Bug ada/49084] [4.7 regression] bootstrap failure with Ada enabled
- Auto-submitted: auto-generated
- References: <bug-49084-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49084
--- Comment #16 from Cesar Strauss <cestrauss at gmail dot com> 2011-12-10 23:03:13 UTC ---
As can be seen in the assembler code above, the Ada compiler thinks the Node
structure is 32 bytes in size, while the C compiler thinks its size is 36
bytes.
The culprit is the struct Flag_Word (gcc/ada/atree.h:116), included in Node,
which increased from 4 bytes to 6 bytes:
struct Flag_Word
{
Boolean flag73 : 1;
Boolean flag74 : 1;
Boolean flag75 : 1;
Boolean flag76 : 1;
Boolean flag77 : 1;
Boolean flag78 : 1;
Boolean flag79 : 1;
Boolean flag80 : 1;
Boolean flag81 : 1;
Boolean flag82 : 1;
Boolean flag83 : 1;
Boolean flag84 : 1;
Boolean flag85 : 1;
Boolean flag86 : 1;
Boolean flag87 : 1;
Boolean flag88 : 1;
Boolean flag89 : 1;
Boolean flag90 : 1;
Boolean flag91 : 1;
Boolean flag92 : 1;
Boolean flag93 : 1;
Boolean flag94 : 1;
Boolean flag95 : 1;
Boolean flag96 : 1;
Short convention : 8;
};
On MinGW, the bitfield packing convention has changed in GCC 4.7: it now
follows the Microsoft compiler (-mms-bitfields). Since the size of the
"convention" field (16 bit short) is different from the previous one (8 bit
unsigned char), padding is added until it starts on a new 16 bit boundary.
Indeed, rebuilding GCC with make 'BOOT_CFLAGS=-g -O2 -mno-ms-bitfields' allows
the build to proceed to completion. Changing Short to Byte in Flag_Word also
works.