This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Fix g++.dg/abi/empty6.C failure for BIGGEST_ALIGNMENT <= 32targets
- From: Mark Mitchell <mark at codesourcery dot com>
- To: Joern Rennecke <joern dot rennecke at superh dot com>
- Cc: gcc-patches at gcc dot gnu dot org, Janis Johnson <janis187 at us dot ibm dot com>
- Date: 03 Jun 2003 14:26:58 -0700
- Subject: Re: Fix g++.dg/abi/empty6.C failure for BIGGEST_ALIGNMENT <= 32targets
- References: <3EDCDEBB.4EB425A6@superh.com>
On Tue, 2003-06-03 at 10:45, Joern Rennecke wrote:
>
> --
> --------------------------
> SuperH (UK) Ltd.
> 2410 Aztec West / Almondsbury / BRISTOL / BS32 4QX
> T:+44 1454 465658
> ----
>
> SH1..SH4 has a BIGGEST_ALIGNEMNT of 32 bit, so if a class definition
> does not demand a larger alignment, an offset of 32 bit
> gets split into a DECL_FIELD_OFFSET of 4 bytes
> and a DECL_FIELD_BIT_OFFSET of 0 bits.
> Thus, DECL_FIELD_OFFSET and byte_position are the same for field a
> in struct B of g++.dg/abi/empty6.C , so no warning about ABI compliance
> is emitted.
> This can be simply rectified by aligning B to something larger than 32 bit.
>
> 2003-06-03 J"orn Rennecke <joern.rennecke@superh.com>
>
> * g++.dg/abi/empty6.C (B): Request alignment of 8 bytes.
OK -- but put this justification into a comment in the code.
Thanks!
-- Mark