This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[patch] dbxout.c
- To: gcc-patches at gcc dot gnu dot org
- Subject: [patch] dbxout.c
- From: clm at cygnus dot com
- Date: Fri, 05 Jan 2001 06:44:59 -0600
- cc: clm at redhat dot com
This problem came up while compiling a test case in the gdb testsuite
(call-ar-st) with -gstabs. Before I applied this patch, the compiler was
segfaulting while trying to access the INTVAL on the PLUS. For this
particular port, the DECL_RTL is:
(mem/s:SI (mem:SI (reg/f:SI 15 sp) 0) 0)
I bootstrapped and tested on a Solaris 2.6 platform. Okay to install?
Catherine
2000-01-02 Catherine Moore <clm@redhat.com>
* dbxout.c (dbxout_parms): Handle invisible ref where decl is a REG.
Index: dbxout.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/dbxout.c,v
retrieving revision 1.70
diff -p -r1.70 dbxout.c
*** dbxout.c 2000/12/31 07:22:28 1.70
--- dbxout.c 2001/01/03 03:01:01
*************** dbxout_parms (parms)
*** 2474,2485 ****
{
/* Parm was passed via invisible reference, with the reference
living on the stack. DECL_RTL looks like
! (MEM (MEM (PLUS (REG ...) (CONST_INT ...)))). */
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));
current_sym_addr = 0;
FORCE_TEXT;
--- 2474,2489 ----
{
/* Parm was passed via invisible reference, with the reference
living on the stack. DECL_RTL looks like
! (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)");
! 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;