From: Jim Wilson Date: Wed, 8 Sep 1993 19:19:32 +0000 (-0700) Subject: (dbxout_parms): For parameters in registers, if use X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=25b5c537ba1004ab5b522b24e60ae6e003b2cf1c;p=gcc.git (dbxout_parms): For parameters in registers, if use DECL_RTL, then must use TREE_TYPE instead of DECL_ARG_TYPE. From-SVN: r5291 --- diff --git a/gcc/dbxout.c b/gcc/dbxout.c index 8e8c08ae26d..94f6d4460b2 100644 --- a/gcc/dbxout.c +++ b/gcc/dbxout.c @@ -2065,6 +2065,7 @@ dbxout_parms (parms) { rtx best_rtl; char regparm_letter; + tree parm_type; /* Parm passed in registers and lives in registers or nowhere. */ current_sym_code = DBX_REGPARM_STABS_CODE; @@ -2074,14 +2075,23 @@ dbxout_parms (parms) /* If parm lives in a register, use that register; pretend the parm was passed there. It would be more consistent to describe the register where the parm was passed, - but in practice that register usually holds something else. */ + but in practice that register usually holds something else. + + If we use DECL_RTL, then we must use the declared type of + the variable, not the type that it arrived in. */ if (REGNO (DECL_RTL (parms)) >= 0 && REGNO (DECL_RTL (parms)) < FIRST_PSEUDO_REGISTER) - best_rtl = DECL_RTL (parms); + { + best_rtl = DECL_RTL (parms); + parm_type = TREE_TYPE (parms); + } /* If the parm lives nowhere, use the register where it was passed. */ else - best_rtl = DECL_INCOMING_RTL (parms); + { + best_rtl = DECL_INCOMING_RTL (parms); + parm_type = DECL_ARG_TYPE (parms); + } current_sym_value = DBX_REGISTER_NUMBER (REGNO (best_rtl)); FORCE_TEXT; @@ -2099,7 +2109,7 @@ dbxout_parms (parms) regparm_letter); } - dbxout_type (DECL_ARG_TYPE (parms), 0, 0); + dbxout_type (parm_type, 0, 0); dbxout_finish_symbol (parms); } else if (GET_CODE (DECL_RTL (parms)) == MEM