------- Comment #7 from uweigand at gcc dot gnu dot org 2006-09-05 12:47 ------- (In reply to comment #5) > Is this also supposed to fix the problem I posted in comment #2? I applied > that > patch to my gcc but it didn't fix the generated code for me. It's just weird > because the bug only appears if the code is complex enough. If it's just a > rather simple function, the generated code is correct.
No, your problem is certainly something completely different. In fact I've never seen GCC (common code) do anything even remotely like: >GCC reserves an area big enough to hold the structure plus padding, >so it can align the structure dynamically at runtime. It stores a >pointer to the reserved area and a pointer to the structure within >the area. Normally, attribute ((aligned)) does not cause any code to be generated that attempts to dynamically adjust alignment at runtime, it simply allows a variable to be aligned up to whatever default stack frame alignment the platform ABI provides for. It appears that the i386 back-end has some special code related to the -mstackrealign option that may be involved here. In any case, this would be something for an i386 back-end person to look into. Since this is a completely unrelated problem, I recommend you open a separate bugzilla for it. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28862