From 1dc9cf5d9fec61fd0bd32f7e4026f5e259d3e016 Mon Sep 17 00:00:00 2001 From: Richard Biener Date: Mon, 9 Jul 2018 07:25:14 +0000 Subject: [PATCH] re PR debug/86413 (gcc.dg/guality/pr48437.c fail) 2018-07-09 Richard Biener PR debug/86413 * dwarf2out.c (gen_block_die): For an early generated DIE always output high/low PC attributes. From-SVN: r262511 --- gcc/ChangeLog | 6 ++++++ gcc/dwarf2out.c | 5 +++++ 2 files changed, 11 insertions(+) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 8add29b83a3..4295d5f2fb6 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2018-07-09 Richard Biener + + PR debug/86413 + * dwarf2out.c (gen_block_die): For an early generated DIE + always output high/low PC attributes. + 2018-07-09 Tom de Vries * cfgexpand.c (expand_debug_source_expr): Handle VAR_DECL. diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index a7c4620cfc3..95232177d83 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -25622,6 +25622,11 @@ gen_block_die (tree stmt, dw_die_ref context_die) /* The outer scopes for inlinings *must* always be represented. We generate DW_TAG_inlined_subroutine DIEs for them. (See below.) */ must_output_die = 1; + else if (BLOCK_DIE (stmt)) + /* If we already have a DIE then it was filled early. Meanwhile + we might have pruned all BLOCK_VARS as optimized out but we + still want to generate high/low PC attributes so output it. */ + must_output_die = 1; else { /* Determine if this block directly contains any "significant" -- 2.30.2