aboutsummaryrefslogtreecommitdiff
path: root/gcc/dwarf2out.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/dwarf2out.c')
-rw-r--r--gcc/dwarf2out.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c
index 6ce8fbc..a00febb 100644
--- a/gcc/dwarf2out.c
+++ b/gcc/dwarf2out.c
@@ -24861,8 +24861,13 @@ decls_for_scope (tree stmt, dw_die_ref context_die)
if we've done it once already. */
if (! early_dwarf)
for (i = 0; i < BLOCK_NUM_NONLOCALIZED_VARS (stmt); i++)
- process_scope_var (stmt, NULL, BLOCK_NONLOCALIZED_VAR (stmt, i),
- context_die);
+ {
+ decl = BLOCK_NONLOCALIZED_VAR (stmt, i);
+ if (TREE_CODE (decl) == FUNCTION_DECL)
+ process_scope_var (stmt, decl, NULL_TREE, context_die);
+ else
+ process_scope_var (stmt, NULL_TREE, decl, context_die);
+ }
}
/* Even if we're at -g1, we need to process the subblocks in order to get