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 c/12105] Local Variabels on "Out-of-phase" Alignment on x86


PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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



------- Additional Comments From dfoesch at cs dot nmsu dot edu  2003-08-29 16:33 -------
How is this the same problem?  Their problem is with libpthread generating an
unaligned stack.

In my problem, gcc _DOES_ generate code to align the stack, even wrapping it in
a function like such:

int foo(void)
{
  int a __attribute__((mode(v4sf))) __attribute__((aligned(16)));

  printf("%i %p\n", __alignof__(a), &a);

  return 0;
}

int main(void)
{
  return foo();
}

Produces the same results.

GCC isn't properly aligning the stack at ALL, even though it by all accounts
should be.

This problem is not involved with libpthreads at all either, I'm not using
threads.  It's also not related to glibc.  The only place I use glibc is for the
printf(), which would have no effect on the allignment of the actual value.

My point is, that even internally to the code GCC is producing, it's producing
unaligned addresses, which are even off-phase so you can't just "work around it"
by adding int's to produce the correct alignment.


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