summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoraldyh <aldyh@138bc75d-0d04-0410-961f-82ee72b054a4>2015-06-06 15:16:02 +0000
committeraldyh <aldyh@138bc75d-0d04-0410-961f-82ee72b054a4>2015-06-06 15:16:02 +0000
commit9668af776f66ba6be4ce89c330849bea51de254e (patch)
treec89d19e8eb7b4aa0c0ae266a9dab1176e1d303de
parent9ed997bec0d0970d7e95a6cc65363c353cf91041 (diff)
downloadgcc-9668af776f66ba6be4ce89c330849bea51de254e.tar.gz
* dwarf2out.c (gen_lexical_block_die): Initialize stmt_die.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@224189 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog4
-rw-r--r--gcc/dwarf2out.c14
2 files changed, 11 insertions, 7 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 0084d749fd6..4d578087dc3 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,7 @@
+2015-06-06 Aldy Hernandez <aldyh@redhat.com>
+
+ * dwarf2out.c (gen_lexical_block_die): Initialize stmt_die.
+
2015-06-06 Richard Sandiford <richard.sandiford@arm.com>
* emit-rtl.c, expr.c, gcse.c, optabs.c, optabs.h, print-rtl.c,
diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c
index 2e3bee34abf..23cf120bee9 100644
--- a/gcc/dwarf2out.c
+++ b/gcc/dwarf2out.c
@@ -19818,7 +19818,7 @@ static void
gen_lexical_block_die (tree stmt, dw_die_ref context_die)
{
dw_die_ref old_die = BLOCK_DIE (stmt);
- dw_die_ref stmt_die;
+ dw_die_ref stmt_die = NULL;
if (!old_die)
{
stmt_die = new_die (DW_TAG_lexical_block, context_die, stmt);
@@ -19859,13 +19859,13 @@ gen_lexical_block_die (tree stmt, dw_die_ref context_die)
if (old_die)
stmt_die = old_die;
- if (!early_dwarf)
+ /* A non abstract block whose blocks have already been reordered
+ should have the instruction range for this block. If so, set the
+ high/low attributes. */
+ if (!early_dwarf && !BLOCK_ABSTRACT (stmt) && TREE_ASM_WRITTEN (stmt))
{
- /* A non abstract block whose blocks have already been reordered
- should have the instruction range for this block. If so, set the
- high/low attributes. */
- if (! BLOCK_ABSTRACT (stmt) && TREE_ASM_WRITTEN (stmt))
- add_high_low_attributes (stmt, stmt_die);
+ gcc_assert (stmt_die);
+ add_high_low_attributes (stmt, stmt_die);
}
decls_for_scope (stmt, stmt_die);