This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/52129] wrong code to pass parameters to tail call function
- From: "jakub at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 06 Feb 2012 09:46:59 +0000
- Subject: [Bug target/52129] wrong code to pass parameters to tail call function
- Auto-submitted: auto-generated
- References: <bug-52129-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52129
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |ASSIGNED
Last reconfirmed| |2012-02-06
AssignedTo|unassigned at gcc dot |jakub at gcc dot gnu.org
|gnu.org |
Ever Confirmed|0 |1
--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-02-06 09:46:59 UTC ---
Created attachment 26580
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=26580
gcc47-pr52129.patch
Untested fix.
Seems on this testcase pretend_args_size is non-zero, and argblock is
initialized for sibcall sequences as:
argblock = crtl->args.internal_arg_pointer;
argblock
#ifdef STACK_GROWS_DOWNWARD
= plus_constant (argblock, crtl->args.pretend_args_size);
#else
= plus_constant (argblock, -crtl->args.pretend_args_size);
#endif
and what is stored into stored_args_map is relative to that argblock
(arg->locate.slot_offset.constant based), while the testing is done with
offsets relative to crtl->args.internal_arg_pointer.