The attached simple change fixes a long standing regression since
4.2. When we have stack arguments and a sibling
call, the dse pass deletes stores to the parent's stack frame when we
have a sibling call because they are are off frame
for the current function. As a result, the sibling call arguments are
not passed correctly on PA.
The attached change disables this behavior.
Tested on hppa2.0w-hp-hpux11.11, hppa64-hp-hpux11.11 and hppa-unknown-
linux-gnu.
Okay for trunk, 4.9 and 4.8?
Dave
--
John David Anglin dave.ang...@bell.net
2014-11-28 John David Anglin <dang...@gcc.gnu.org>
PR target/55023
* dse.c (scan_insn): Set stores_off_frame_dead_at_return to false if
we have a sibling call.
Index: dse.c
===================================================================
--- dse.c (revision 217974)
+++ dse.c (working copy)
@@ -2483,6 +2483,9 @@
insn_info->cannot_delete = true;
+ if (SIBLING_CALL_P (insn))
+ stores_off_frame_dead_at_return = false;
+
/* Const functions cannot do anything bad i.e. read memory,
however, they can read their parameters which may have
been pushed onto the stack.