aboutsummaryrefslogtreecommitdiff
path: root/gcc/dwarf2out.c
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2018-09-26 07:05:01 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2018-09-26 07:05:01 +0000
commit392047f92ad5d7c388fe42dfaa1c72c8cc1996ec (patch)
treebe2c8d41c2eb5a7a515dbb0ce88e4ddfed55a65c /gcc/dwarf2out.c
parent201054a7f042f5f175605ca64accb2a812b27bfe (diff)
downloadgcc-392047f92ad5d7c388fe42dfaa1c72c8cc1996ec.zip
gcc-392047f92ad5d7c388fe42dfaa1c72c8cc1996ec.tar.gz
gcc-392047f92ad5d7c388fe42dfaa1c72c8cc1996ec.tar.bz2
re PR debug/87428 ("Missed" inline instances cause bogus DWARF to be emitted)
2018-09-26 Richard Biener <rguenther@suse.de> PR debug/87428 PR debug/87362 * tree-inline.c (expand_call_inline): When the location of the call is UNKNOWN_LOCATION use DECL_SOURCE_LOCATION or BUILTINS_LOCATION for the BLOCK_SOURCE_LOCATION of the inserted BLOCK to make inlined_function_outer_scope_p recognize it. * dwarf2out.c (add_call_src_coords_attributes): Do not add coords for reserved locations. From-SVN: r264594
Diffstat (limited to 'gcc/dwarf2out.c')
-rw-r--r--gcc/dwarf2out.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c
index 1607269..3c10ec8 100644
--- a/gcc/dwarf2out.c
+++ b/gcc/dwarf2out.c
@@ -23907,6 +23907,10 @@ gen_label_die (tree decl, dw_die_ref context_die)
static inline void
add_call_src_coords_attributes (tree stmt, dw_die_ref die)
{
+ /* We can end up with BUILTINS_LOCATION here. */
+ if (RESERVED_LOCATION_P (BLOCK_SOURCE_LOCATION (stmt)))
+ return;
+
expanded_location s = expand_location (BLOCK_SOURCE_LOCATION (stmt));
if (dwarf_version >= 3 || !dwarf_strict)