diff options
author | Jim Wilson <wilson@gcc.gnu.org> | 1993-09-08 12:19:32 -0700 |
---|---|---|
committer | Jim Wilson <wilson@gcc.gnu.org> | 1993-09-08 12:19:32 -0700 |
commit | 25b5c537ba1004ab5b522b24e60ae6e003b2cf1c (patch) | |
tree | 3a8914063cbbdf3c9b018453f1ebdf87502ca7da | |
parent | d1460eef26e329523204fd8dfadba5f2189a704b (diff) | |
download | gcc-25b5c537ba1004ab5b522b24e60ae6e003b2cf1c.zip gcc-25b5c537ba1004ab5b522b24e60ae6e003b2cf1c.tar.gz gcc-25b5c537ba1004ab5b522b24e60ae6e003b2cf1c.tar.bz2 |
(dbxout_parms): For parameters in registers, if use
DECL_RTL, then must use TREE_TYPE instead of DECL_ARG_TYPE.
From-SVN: r5291
-rw-r--r-- | gcc/dbxout.c | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/gcc/dbxout.c b/gcc/dbxout.c index 8e8c08a..94f6d44 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 |