Hi,

Static chain returned from get_rtl_for_parm_ssa_default_def may not
have Pmode.  This patch converts static chain to Pmode if needed.
Tested on Linux/x86-64.  OK for trunk?

Thanks.


H.J.
---
2015-07-24  H.J. Lu  <hongjiu...@intel.com>

        PR bootstrap/66978
        * function.c (expand_function_start): Convert static chain to
        Pmode if needed.

diff --git a/gcc/function.c b/gcc/function.c
index c3d00cd..f63c9be 100644
--- a/gcc/function.c
+++ b/gcc/function.c
@@ -5207,6 +5207,10 @@ expand_function_start (tree subr)
       SET_DECL_RTL (parm, local);
       mark_reg_pointer (local, TYPE_ALIGN (TREE_TYPE (TREE_TYPE (parm))));
 
+      if (GET_MODE (local) != Pmode)
+       local = convert_to_mode (Pmode, local,
+                                TYPE_UNSIGNED (TREE_TYPE (parm)));
+
       insn = emit_move_insn (local, chain);
 
       /* Mark the register as eliminable, similar to parameters.  */

Reply via email to