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 middle-end/42722] move_by_pieces() incorrectly pushes structures to stack



------- Comment #5 from shcherbakov at daad-alumni dot de  2010-01-30 20:08 -------
Oops, missed a semicolon in the first line of "test case" (compile it with
g++).
ARM uses ACCUMULATE_OUTGOING_ARGS instead of PUSH_ARGS. To reproduce the
problem on ARM, you need to comment out "#define ACCUMULATE_OUTGOING_ARGS 1"
and add "#define PUSH_ARGS 1" in "gcc/config/arm/arm.h", so that func1() will
contain several "push" instructions rather than "mov xxx, [sp + yyy]".
To see that the code has been compiled incorrectly, simply examine the assembly
output of "func1()", that will push the "copy" to stack starting with first
word and ending with the last one (causing the layout in stack to be inverted).


-- 


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


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