This is the mail archive of the gcc-bugs@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]

[Bug target/28763] sizeof() and __attribute__ broken with bit-fields on ppc-eabi



------- Comment #13 from joseph at codesourcery dot com  2009-06-16 17:26 -------
Subject: Re:  wrong size of struct with some bit-fields on
 ppc-eabi

On Tue, 16 Jun 2009, mcvick_e at iname dot com wrote:

> Furthermore, as stated numerous comments back with a link to the actual PPC
> ABI, bitfields are to have a 32-bit alignment period.  Are you implying that

There's no point in quoting an ABI document when you have chosen to use an 
option (-mno-bit-align in the original bug report) whose sole purpose is 
to deviate from the ABI.  Or when you are using features such as 
attributes that are outside the scope of the ABI document (which is an ABI 
for ISO C).

In fact I can only reproduce the described symptoms with -mbit-align, not 
-mno-bit-align - it appears the handling of this option may have been 
broken in the conversion to .opt files, which would be a genuine 
regression.  The default, without ABI-breaking options, is that both have 
size 8, which is in accordance with the latest ABI draft being developed 
in the Power.org ABI working group.

That is, the default behavior (for the original case without attributes) 
is correct, but the option that gives the size being 6 should be 
-mno-bit-align not -mbit-align, and this appears to have been broken since 
4.1.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28763


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