From ebb0cdf335554673adc52f752ce7f9bc2dd2121e Mon Sep 17 00:00:00 2001 From: Catherine Moore Date: Fri, 5 Jan 2001 20:15:24 +0000 Subject: [PATCH] (dbxout_parms): Handle invisible ref where decl is a REG From-SVN: r38720 --- gcc/ChangeLog | 4 ++++ gcc/dbxout.c | 10 +++++++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index b9358cbcd6a..4b9a3bf1325 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +2001-01-05 Catherine Moore + + * dbxout.c ((dbxout_parms): Handle invisible ref where decl is a REG. + 2001-01-05 Phil Edwards * cp/lang-options.h: Bring comment in line with reality. diff --git a/gcc/dbxout.c b/gcc/dbxout.c index c3838dfe956..2d4ea6dd863 100644 --- a/gcc/dbxout.c +++ b/gcc/dbxout.c @@ -2474,12 +2474,16 @@ dbxout_parms (parms) { /* Parm was passed via invisible reference, with the reference living on the stack. DECL_RTL looks like - (MEM (MEM (PLUS (REG ...) (CONST_INT ...)))). */ + (MEM (MEM (PLUS (REG ...) (CONST_INT ...)))) or it + could look like (MEM (MEM (REG))). */ const char *decl_name = (DECL_NAME (parms) ? IDENTIFIER_POINTER (DECL_NAME (parms)) : "(anon)"); - current_sym_value - = INTVAL (XEXP (XEXP (XEXP (DECL_RTL (parms), 0), 0), 1)); + if (GET_CODE (XEXP (XEXP (DECL_RTL (parms), 0), 0)) == REG) + current_sym_value = 0; + else + current_sym_value + = INTVAL (XEXP (XEXP (XEXP (DECL_RTL (parms), 0), 0), 1)); current_sym_addr = 0; FORCE_TEXT; -- 2.30.2