aboutsummaryrefslogtreecommitdiff
path: root/gcc/dwarf2out.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2017-03-31 20:40:35 +0200
committerJakub Jelinek <jakub@gcc.gnu.org>2017-03-31 20:40:35 +0200
commiteee3756de395ab6220f78b471a7cd877301455a2 (patch)
tree2542ad7a6c94a0dcd240765a7c63e117419e2992 /gcc/dwarf2out.c
parent6f3af3562804db0ef656dcc02b1e192c8f7fc8cc (diff)
downloadgcc-eee3756de395ab6220f78b471a7cd877301455a2.zip
gcc-eee3756de395ab6220f78b471a7cd877301455a2.tar.gz
gcc-eee3756de395ab6220f78b471a7cd877301455a2.tar.bz2
re PR bootstrap/79255 (PGO bootstrap fails on x86_64/ppc64le building Ada)
PR debug/79255 * dwarf2out.c (decls_for_scope): If BLOCK_NONLOCALIZED_VAR is a FUNCTION_DECL, pass it as decl instead of origin to process_scope_var. * gcc.dg/pr79255.c: New test. From-SVN: r246622
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