diff options
author | Daniel Berlin <dberlin@dberlin.org> | 2005-01-04 01:54:26 +0000 |
---|---|---|
committer | Daniel Berlin <dberlin@gcc.gnu.org> | 2005-01-04 01:54:26 +0000 |
commit | 1eb3331e96ce4c7652004ef02da7ca9e72539555 (patch) | |
tree | 416968ea26b7983325a0c2ff0b9e690796ea0157 /gcc/dwarf2out.c | |
parent | 35a91d76115048150dd7700a9606756dec2d8d42 (diff) | |
download | gcc-1eb3331e96ce4c7652004ef02da7ca9e72539555.zip gcc-1eb3331e96ce4c7652004ef02da7ca9e72539555.tar.gz gcc-1eb3331e96ce4c7652004ef02da7ca9e72539555.tar.bz2 |
Fix PR debug/17924 Fix PR debug/19191
2005-01-03 Daniel Berlin <dberlin@dberlin.org>
Fix PR debug/17924
Fix PR debug/19191
* dwarf2out.c (block_ultimate_origin): Follow decl origin if origin
is a decl.
* gimple-low.c (mark_blocks_with_used_vars): New function.
(mark_blocks_with_used_subblocks): Ditto.
(mark_used_blocks): Ditto.
(pass_mark_used_blocks): New pass.
* tree-inline.c: Include debug.h.
(expand_call_inline): Call outlining_inline_function here.
* tree-optimize.c (init_tree_optimization_passes): Add
pass_mark_used_blocks.
* tree-pass.h (pass_mark_used_blocks): New.
* Makefile.in (tree-inline.o): Add debug.h dependency.
From-SVN: r92882
Diffstat (limited to 'gcc/dwarf2out.c')
-rw-r--r-- | gcc/dwarf2out.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index 26174ec..0ad5ce3 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -4632,6 +4632,15 @@ block_ultimate_origin (tree block) ? BLOCK_ABSTRACT_ORIGIN (ret_val) : NULL); } while (lookahead != NULL && lookahead != ret_val); + + /* The block's abstract origin chain may not be the *ultimate* origin of + the block. It could lead to a DECL that has an abstract origin set. + If so, we want that DECL's abstract origin (which is what DECL_ORIGIN + will give us if it has one). Note that DECL's abstract origins are + supposed to be the most distant ancestor (or so decl_ultimate_origin + claims), so we don't need to loop following the DECL origins. */ + if (DECL_P (ret_val)) + return DECL_ORIGIN (ret_val); return ret_val; } |