This is the mail archive of the gcc@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: A problem with aligment attribute


H. J. Lu wrote:
void
foo (int i, float128_type x)
{
...
  if (((long) (&x.word0) & 15) != 0)
    abort ();

You are asking for a function argument to have 16-byte alignment, but the ABI does not support that. PARM_BOUNDARY is 32, so an argument can have at most 4 byte alignment.


Try passing in a pointer, or using a global or local instead of an argument.

We could perhaps emit a warning if someone tries to use an aligned type in an argument list, and the aligned type requires greater alignment than the ABI will give. I don't think we should be changing ABIs to make this work.
--
Jim Wilson, GNU Tools Support, http://www.SpecifixInc.com



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