diff options
author | Jakub Jelinek <jakub@redhat.com> | 2010-03-12 14:04:37 +0100 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2010-03-12 14:04:37 +0100 |
commit | 70235ab941c572a4efabd15fcf737c22fc999814 (patch) | |
tree | 0b29e6fc9123592f39dc916a03b18fd320d0c99f /gcc/tree-inline.c | |
parent | d76f631a86565e06d58ee1dbf63a386fd5e9fdec (diff) | |
download | gcc-70235ab941c572a4efabd15fcf737c22fc999814.zip gcc-70235ab941c572a4efabd15fcf737c22fc999814.tar.gz gcc-70235ab941c572a4efabd15fcf737c22fc999814.tar.bz2 |
re PR debug/43329 (Early inlining causes suboptimal debug info)
PR debug/43329
* tree-inline.c (remap_decls): Put old_var rather than origin_var
into *nonlocalized_list vector.
* dwarf2out.c (gen_formal_parameter_die): Call decl_ultimate_origin
even if origin is non-NULL.
(gen_variable_die): Likewise.
(process_scope_var): Don't change origin.
(gen_decl_die): Likewise.
* tree-cfgcleanup.c (remove_forwarder_block): Check single_pred_p
before adding new edges instead of after it, fix moving over
debug stmts.
* gcc.dg/guality/pr43329-1.c: New test.
From-SVN: r157402
Diffstat (limited to 'gcc/tree-inline.c')
-rw-r--r-- | gcc/tree-inline.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/gcc/tree-inline.c b/gcc/tree-inline.c index de8ca70..f3c4204 100644 --- a/gcc/tree-inline.c +++ b/gcc/tree-inline.c @@ -533,7 +533,6 @@ remap_decls (tree decls, VEC(tree,gc) **nonlocalized_list, copy_body_data *id) for (old_var = decls; old_var; old_var = TREE_CHAIN (old_var)) { tree new_var; - tree origin_var = DECL_ORIGIN (old_var); if (can_be_nonlocal (old_var, id)) { @@ -545,7 +544,7 @@ remap_decls (tree decls, VEC(tree,gc) **nonlocalized_list, copy_body_data *id) if ((!optimize || debug_info_level > DINFO_LEVEL_TERSE) && !DECL_IGNORED_P (old_var) && nonlocalized_list) - VEC_safe_push (tree, gc, *nonlocalized_list, origin_var); + VEC_safe_push (tree, gc, *nonlocalized_list, old_var); continue; } @@ -563,7 +562,7 @@ remap_decls (tree decls, VEC(tree,gc) **nonlocalized_list, copy_body_data *id) if ((!optimize || debug_info_level > DINFO_LEVEL_TERSE) && !DECL_IGNORED_P (old_var) && nonlocalized_list) - VEC_safe_push (tree, gc, *nonlocalized_list, origin_var); + VEC_safe_push (tree, gc, *nonlocalized_list, old_var); } else { |