aboutsummaryrefslogtreecommitdiff
path: root/gcc/function.c
diff options
context:
space:
mode:
authorRichard Stallman <rms@gnu.org>1992-07-20 02:42:59 +0000
committerRichard Stallman <rms@gnu.org>1992-07-20 02:42:59 +0000
commit16bae307a6e7d48d6787c671c3a269a71f08b899 (patch)
tree1b4fe803104cea2e9fa6a084029306e6980e908a /gcc/function.c
parent7e53036d32da0c9669e2465aefa842bf772bc477 (diff)
downloadgcc-16bae307a6e7d48d6787c671c3a269a71f08b899.zip
gcc-16bae307a6e7d48d6787c671c3a269a71f08b899.tar.gz
gcc-16bae307a6e7d48d6787c671c3a269a71f08b899.tar.bz2
(assign_parms): Use const0_rtx as DECL_RTL and as
DECL_INCOMING_RTL if tmode of parm is void. From-SVN: r1635
Diffstat (limited to 'gcc/function.c')
-rw-r--r--gcc/function.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/gcc/function.c b/gcc/function.c
index 87db0bb..4fa8ed0 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. */