This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] IA-32 bitfields (take 4)
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Mark Mitchell <mark at codesourcery dot com>
- Cc: Richard Henderson <rth at redhat dot com>, "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>, Aldy Hernandez <aldyh at redhat dot com>, Geoffrey Keating <geoffk at redhat dot com>, "dje at watson dot ibm dot com" <dje at watson dot ibm dot com>
- Date: Wed, 7 Aug 2002 14:56:06 -0400
- Subject: Re: [PATCH] IA-32 bitfields (take 4)
- References: <20020807182154.A17404@sunsite.ms.mff.cuni.cz> <130570000.1028739977@warlock.codesourcery.com>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Wed, Aug 07, 2002 at 10:06:17AM -0700, Mark Mitchell wrote:
>
> This new version looks like the cleanest yet to me.
>
> Please bootstrap, check, and commit. Make sure that David's PPC
> issues get addressed.
Bootstrapped, regression checked, commited.
> Tell me when this is in so that I can (finally) start the prerelease.
I did some more testing and:
typedef long ca __attribute__((aligned (8)));
struct A
{
char a;
union UA // should be 8 bytes aligned, is 4 bytes
{
char x;
ca y : 6;
} b;
char c;
} a;
struct B
{
char a;
union UB // this one is ok
{
char x;
long y : 6 __attribute__((aligned (8)));
} b;
char c;
} b;
struct C
{
char a;
struct UC // should be 8 bytes aligned, is 4 bytes
{
ca y : 6;
} b;
char c;
} c;
struct C
{
char a;
struct UC // this one is ok
{
long y : 6 __attribute__((aligned (8)));
} b;
char c;
} c;
still seems to give different result than it should on IA-32,
though it is not related to ADJUST_FIELD_ALIGN in this case
(only in struct A, struct B is correct).
Is this something which needs to be addressed or is it just too rare
construct to require this to be fixed for 3.2?
Jakub