This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/42722] move_by_pieces() incorrectly pushes structures to stack
- From: "shcherbakov at daad-alumni dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 30 Jan 2010 20:08:12 -0000
- Subject: [Bug middle-end/42722] move_by_pieces() incorrectly pushes structures to stack
- References: <bug-42722-18129@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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