Commit c7d2d61d by Richard Stallman

(expand_end_bindings): Generation of NOTE_INSN_BLOCK_END

moved down so that it occurs after call to `expand_cleanups'.

From-SVN: r1937
parent 7343f784
......@@ -2481,14 +2481,6 @@ expand_end_bindings (vars, mark_ends, dont_jump_in)
&& ! DECL_IN_SYSTEM_HEADER (decl))
warning_with_decl (decl, "unused variable `%s'");
/* Mark the beginning and end of the scope if requested. */
if (mark_ends)
emit_note (NULL_PTR, NOTE_INSN_BLOCK_END);
else
/* Get rid of the beginning-mark if we don't make an end-mark. */
NOTE_LINE_NUMBER (thisblock->data.block.first_insn) = NOTE_INSN_DELETED;
if (thisblock->exit_label)
{
do_pending_stack_adjust ();
......@@ -2670,6 +2662,16 @@ expand_end_bindings (vars, mark_ends, dont_jump_in)
dont_jump_in);
}
/* Mark the beginning and end of the scope if requested.
We do this now, after running cleanups on the variables
just going out of scope, so they are in scope for their cleanups. */
if (mark_ends)
emit_note (NULL_PTR, NOTE_INSN_BLOCK_END);
else
/* Get rid of the beginning-mark if we don't make an end-mark. */
NOTE_LINE_NUMBER (thisblock->data.block.first_insn) = NOTE_INSN_DELETED;
/* If doing stupid register allocation, make sure lives of all
register variables declared here extend thru end of scope. */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment