From 75f6aa1535910908e6f82b01541fdf204a3bcc76 Mon Sep 17 00:00:00 2001 From: ebotcazou Date: Tue, 7 Jul 2009 20:46:06 +0000 Subject: [PATCH] PR debug/40666 * dbxout.c (dbxout_symbol) : Deal with parameters pointing to variables for debugging purposes. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@149346 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 6 ++++++ gcc/dbxout.c | 12 +++++++++--- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 6c4d6d2..39cc552 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2009-07-07 Eric Botcazou + + PR debug/40666 + * dbxout.c (dbxout_symbol) : Deal with parameters pointing + to variables for debugging purposes. + 2009-06-23 Mark Loeser PR build/40010 diff --git a/gcc/dbxout.c b/gcc/dbxout.c index df11628..bc7965e 100644 --- a/gcc/dbxout.c +++ b/gcc/dbxout.c @@ -2778,9 +2778,15 @@ dbxout_symbol (tree decl, int local ATTRIBUTE_UNUSED) } case PARM_DECL: - /* Parm decls go in their own separate chains - and are output by dbxout_reg_parms and dbxout_parms. */ - gcc_unreachable (); + if (DECL_HAS_VALUE_EXPR_P (decl)) + decl = DECL_VALUE_EXPR (decl); + + /* PARM_DECLs go in their own separate chain and are output by + dbxout_reg_parms and dbxout_parms, except for those that are + disguised VAR_DECLs like Out parameters in Ada. */ + gcc_assert (TREE_CODE (decl) == VAR_DECL); + + /* ... fall through ... */ case RESULT_DECL: case VAR_DECL: -- 2.7.4