aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Merrill <jason@yorick.cygnus.com>1998-10-25 16:56:23 -0700
committerJeff Law <law@gcc.gnu.org>1998-10-25 16:56:23 -0700
commit0679e3fcb626d03ccdef64d4826c8ecac3b8a631 (patch)
tree9fc0f9f2b8a9b9f985f6e61ef96ea5774aae5c92
parente17f9bc09816e3777c2dab4e4644c1c06f3422f9 (diff)
downloadgcc-0679e3fcb626d03ccdef64d4826c8ecac3b8a631.zip
gcc-0679e3fcb626d03ccdef64d4826c8ecac3b8a631.tar.gz
gcc-0679e3fcb626d03ccdef64d4826c8ecac3b8a631.tar.bz2
stmt.c (expand_fixup): Set fixup->before_jump to a NOTE_INSN_DELETED instead of a NOTE_INSN_BLOCK_BEG.
8 * stmt.c (expand_fixup): Set fixup->before_jump to a NOTE_INSN_DELETED instead of a NOTE_INSN_BLOCK_BEG. From-SVN: r23330
-rw-r--r--gcc/stmt.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/gcc/stmt.c b/gcc/stmt.c
index f821d77..46a5bcb 100644
--- a/gcc/stmt.c
+++ b/gcc/stmt.c
@@ -886,19 +886,25 @@ expand_fixup (tree_label, rtl_label, last_insn)
code which we might later insert at this point in the insn
stream. Also, the BLOCK node will be the parent (i.e. the
`SUPERBLOCK') of any other BLOCK nodes which we might create
- later on when we are expanding the fixup code. */
+ later on when we are expanding the fixup code.
+
+ Note that optimization passes (including expand_end_loop)
+ might move the *_BLOCK notes away, so we use a NOTE_INSN_DELETED
+ as a placeholder. */
{
register rtx original_before_jump
= last_insn ? last_insn : get_last_insn ();
+ rtx start;
start_sequence ();
pushlevel (0);
- fixup->before_jump = emit_note (NULL_PTR, NOTE_INSN_BLOCK_BEG);
+ start = emit_note (NULL_PTR, NOTE_INSN_BLOCK_BEG);
+ fixup->before_jump = emit_note (NULL_PTR, NOTE_INSN_DELETED);
last_block_end_note = emit_note (NULL_PTR, NOTE_INSN_BLOCK_END);
fixup->context = poplevel (1, 0, 0); /* Create the BLOCK node now! */
end_sequence ();
- emit_insns_after (fixup->before_jump, original_before_jump);
+ emit_insns_after (start, original_before_jump);
}
fixup->block_start_count = block_start_count;