[PATCH] IA-32 bitfields (take 4)
Jakub Jelinek
jakub@redhat.com
Wed Aug 7 11:56:00 GMT 2002
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
More information about the Gcc-patches
mailing list