(assign_parms): Use const0_rtx as DECL_RTL and as
authorRichard Stallman <rms@gnu.org>
Mon, 20 Jul 1992 02:42:59 +0000 (02:42 +0000)
committerRichard Stallman <rms@gnu.org>
Mon, 20 Jul 1992 02:42:59 +0000 (02:42 +0000)
DECL_INCOMING_RTL if tmode of parm is void.

From-SVN: r1635

gcc/function.c

index 87db0bb15cbe2c1ab93d83ec36db5d72b2788e97..4fa8ed019a0d9d749de93d1b1ccc8bad4dd4b7a7 100644 (file)
@@ -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.  */