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

Re: [PATCH] IA-32 bitfields (take 4)


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


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