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

[Bug target/52023] _Alignof (double) yields wrong value on x86


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

--- Comment #5 from Andrew Pinski <pinskia at gcc dot gnu.org> 2012-01-27 21:13:29 UTC ---
(In reply to comment #4)
It gets even worse with the following two structures:
struct
{
  double d;
  char i;
  double d1;
  int i1;
};

struct
{
  char i;
  double d;
  char i1;
  double d1;
};

The second one is packed into 4 byte alignment so the sizeof is 3*8 while the
first one is sizeof is 4*8.  So powerpc-aix's alignof double depends on it is a
field or not and which field of the structure is first.


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