stack-parm-1.patch
Doug Evans
devans@cygnus.com
Mon Oct 20 15:39:00 GMT 1997
This patch fixes a bug in function.c:assign_parms.
In an `else' we have
else
{
/* Value must be stored in the stack slot STACK_PARM
during function execution. */
if (promoted_mode != nominal_mode)
{
... convert entry_parm to nominal_mode ...
}
then we have
if (entry_parm != stack_parm)
{
...
if (promoted_mode != nominal_mode)
{
push_to_sequence (conversion_insns);
emit_move_insn (validize_mem (stack_parm),
validize_mem (entry_parm));
Note that while the mode of entry_parm is converted to nominal_mode,
the mode of stack_parm is not and hence emit_move_insn will abort.
Thu Oct 16 10:37:14 1997 Doug Evans <dje@canuck.cygnus.com>
* function.c (assign_parms): Correct mode of stack_parm if
entry_parm underwent a mode conversion.
*** function.c.orig Thu Aug 28 11:14:05 1997
--- function.c Thu Oct 16 10:40:16 1997
*************** assign_parms (fndecl, second_time)
*** 4053,4058 ****
--- 4053,4064 ----
push_to_sequence (conversion_insns);
entry_parm = convert_to_mode (nominal_mode, tempreg,
TREE_UNSIGNED (TREE_TYPE (parm)));
+ if (stack_parm)
+ {
+ /* ??? This may need a big-endian conversion on sparc64. */
+ stack_parm = change_address (stack_parm, nominal_mode,
+ NULL_RTX);
+ }
conversion_insns = get_insns ();
did_conversion = 1;
end_sequence ();
More information about the Gcc-bugs
mailing list