aboutsummaryrefslogtreecommitdiff
path: root/gcc/stmt.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2000-06-24 21:42:58 +0200
committerJakub Jelinek <jakub@gcc.gnu.org>2000-06-24 21:42:58 +0200
commitef97beff0aebd6342af56423a6affe9a6e92bf8f (patch)
tree95480aecc21055287bb77a12dfa1fd0ed8a29422 /gcc/stmt.c
parent0b4565c9d8b4b7530558beef1b9284b88848b2fa (diff)
downloadgcc-ef97beff0aebd6342af56423a6affe9a6e92bf8f.zip
gcc-ef97beff0aebd6342af56423a6affe9a6e92bf8f.tar.gz
gcc-ef97beff0aebd6342af56423a6affe9a6e92bf8f.tar.bz2
stmt.c (expand_decl_cleanup): Emit a dummy insn after last_unconditional_cleanup.
* stmt.c (expand_decl_cleanup): Emit a dummy insn after last_unconditional_cleanup. From-SVN: r34681
Diffstat (limited to 'gcc/stmt.c')
-rw-r--r--gcc/stmt.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/stmt.c b/gcc/stmt.c
index f97faaa..3f102cf 100644
--- a/gcc/stmt.c
+++ b/gcc/stmt.c
@@ -4064,6 +4064,13 @@ expand_decl_cleanup (decl, cleanup)
{
thisblock->data.block.last_unconditional_cleanup
= get_last_insn ();
+ /* When we insert instructions after the last unconditional cleanup,
+ we don't adjust last_insn. That means that a later add_insn will
+ clobber the instructions we've just added. The easiest way to
+ fix this is to just insert another instruction here, so that the
+ instructions inserted after the last unconditional cleanup are
+ never the last instruction. */
+ emit_note (NULL_PTR, NOTE_INSN_DELETED);
thisblock->data.block.cleanup_ptr = &thisblock->data.block.cleanups;
}
}