diff options
author | Richard Biener <rguenther@suse.de> | 2018-09-26 14:35:48 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2018-09-26 14:35:48 +0000 |
commit | 39aae6036286c24bdb1d7dd49ccd588f93e8cb8f (patch) | |
tree | aee922778068a10b1c7fee9895b469b8cd303469 /gcc/dwarf2out.c | |
parent | 9b4e3b9a661e6316b0fe2a966347fc8e9c39d552 (diff) | |
download | gcc-39aae6036286c24bdb1d7dd49ccd588f93e8cb8f.zip gcc-39aae6036286c24bdb1d7dd49ccd588f93e8cb8f.tar.gz gcc-39aae6036286c24bdb1d7dd49ccd588f93e8cb8f.tar.bz2 |
re PR debug/87443 (GCC mixes abstract and concrete instances in abstract origins for inlines)
2018-09-26 Richard Biener <rguenther@suse.de>
PR debug/87443
* dwarf2out.c (gen_lexical_block_die): Do not equate inline
or concrete instance DIE to the tree. Create abstract origin
attributes also for concrete instances.
* gcc.dg/debug/dwarf2/inline5.c: New testcase.
From-SVN: r264643
Diffstat (limited to 'gcc/dwarf2out.c')
-rw-r--r-- | gcc/dwarf2out.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index 3c10ec8..b0c5c4f 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -24091,18 +24091,16 @@ gen_lexical_block_die (tree stmt, dw_die_ref context_die) } else if (BLOCK_ABSTRACT_ORIGIN (stmt)) { - /* If this is an inlined instance, create a new lexical die for - anything below to attach DW_AT_abstract_origin to. */ + /* If this is an inlined or conrecte instance, create a new lexical + die for anything below to attach DW_AT_abstract_origin to. */ if (old_die) - { - stmt_die = new_die (DW_TAG_lexical_block, context_die, stmt); - equate_block_to_die (stmt, stmt_die); - old_die = NULL; - } + stmt_die = new_die (DW_TAG_lexical_block, context_die, stmt); tree origin = block_ultimate_origin (stmt); - if (origin != NULL_TREE && origin != stmt) + if (origin != NULL_TREE && (origin != stmt || old_die)) add_abstract_origin_attribute (stmt_die, origin); + + old_die = NULL; } if (old_die) |