From 16bae307a6e7d48d6787c671c3a269a71f08b899 Mon Sep 17 00:00:00 2001 From: Richard Stallman Date: Mon, 20 Jul 1992 02:42:59 +0000 Subject: [PATCH] (assign_parms): Use const0_rtx as DECL_RTL and as DECL_INCOMING_RTL if tmode of parm is void. From-SVN: r1635 --- gcc/function.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/gcc/function.c b/gcc/function.c index 87db0bb15cb..4fa8ed019a0 100644 --- a/gcc/function.c +++ b/gcc/function.c @@ -2556,6 +2556,14 @@ assign_parms (fndecl, second_time) passed_mode = TYPE_MODE (passed_type); nominal_mode = TYPE_MODE (TREE_TYPE (parm)); + /* If the parm's mode is VOID, its value doesn't matter, + and avoid the usual things like emit_move_insn that could crash. */ + if (nominal_mode == VOIDmode) + { + DECL_INCOMING_RTL (parm) = DECL_RTL (parm) = const0_rtx; + continue; + } + #ifdef FUNCTION_ARG_PASS_BY_REFERENCE /* See if this arg was passed by invisible reference. */ if (FUNCTION_ARG_PASS_BY_REFERENCE (args_so_far, passed_mode, @@ -2860,7 +2868,7 @@ assign_parms (fndecl, second_time) /* If we were passed a pointer but the actual value can safely live in a register, put it in one. */ - if (passed_pointer && nominal_mode != BLKmode + if (passed_pointer && TYPE_MODE (TREE_TYPE (parm)) != BLKmode && ! ((obey_regdecls && ! DECL_REGISTER (parm) && ! DECL_INLINE (fndecl)) /* layout_decl may set this. */ -- 2.30.2