aboutsummaryrefslogtreecommitdiff
path: root/gcc/dbxout.c
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2009-07-07 20:46:06 +0000
committerEric Botcazou <ebotcazou@gcc.gnu.org>2009-07-07 20:46:06 +0000
commited3346c20d1e764dcd98cd84e47d8f7a7ae72fcb (patch)
tree62db0a7e19f85d27e3c92815a90884a37aa15f8d /gcc/dbxout.c
parent4db19cc75975bf042349055e80831dfea4201a53 (diff)
downloadgcc-ed3346c20d1e764dcd98cd84e47d8f7a7ae72fcb.zip
gcc-ed3346c20d1e764dcd98cd84e47d8f7a7ae72fcb.tar.gz
gcc-ed3346c20d1e764dcd98cd84e47d8f7a7ae72fcb.tar.bz2
re PR debug/40666 (Ada tools build failure)
PR debug/40666 * dbxout.c (dbxout_symbol) <PARM_DECL>: Deal with parameters pointing to variables for debugging purposes. From-SVN: r149346
Diffstat (limited to 'gcc/dbxout.c')
-rw-r--r--gcc/dbxout.c12
1 files changed, 9 insertions, 3 deletions
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: