------- Comment #12 from mcvick_e at iname dot com  2009-06-16 16:55 -------
Can you be a bit more succinct here?  Because the comment just made sounds like
a bunch of foo foo stuff made up to ignore a genuine bug in the compiler.

Type byte has a byte alignment.
Type short has a 16-bit alignment.
Type int has a 32-bit alignment.

Especially in the case where strict-align is used.  We have a
processor/environment that requires strict alignment and we force it via the
compiler flags.

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
the fields within the structure are considered variables?  If so that statement
is incorrect as they are fields of a type declaration, which sum total 32-bits
(which match the alignment requirement of the ABI).

The fact that it was working correctly in 4.0.1 (with the __attribute__
specifications) tells me that this is a bug introduced in the compiler
following that release.

I think the reason this bug has been ignored for a very long time (as in opened
in June of 2006, so 3 years now), is that some core component of the compiler
relies on the bug.

Yes it's great to save space when possible, but not at the cost of incorrectly
violating the ABI.  I guess we will have to roll back to 4.0.1 because we can
at least get the __CORRECT__ behavior out of the compiler.  Which is a shame as
the new compiler had features that we were hoping to utilize.

This is a bug, a critical one at that, and needs to be fixed.  If you don't
know how to then just state that and stop hiding behind the ABI which worked
against you, and some obtuse commentary that sounded like a politicians
statement which meant nothing.


-- 

mcvick_e at iname dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|normal                      |major


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

Reply via email to