aboutsummaryrefslogtreecommitdiff
path: root/gcc
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
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')
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/stmt.c7
2 files changed, 12 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 9633f0b..0dcfdff 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2000-06-24 Jakub Jelinek <jakub@redhat.com>
+
+ * stmt.c (expand_decl_cleanup): Emit a dummy insn after
+ last_unconditional_cleanup.
+
2000-06-24 Bernd Schmidt <bernds@cygnus.co.uk>
* tree.def (VECTOR_TYPE): New node type.
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;
}
}