stmt.c (expand_decl_cleanup): Emit a dummy insn after last_unconditional_cleanup.
authorJakub Jelinek <jakub@redhat.com>
Sat, 24 Jun 2000 19:42:58 +0000 (21:42 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Sat, 24 Jun 2000 19:42:58 +0000 (21:42 +0200)
* stmt.c (expand_decl_cleanup): Emit a dummy insn after
last_unconditional_cleanup.

From-SVN: r34681

gcc/ChangeLog
gcc/stmt.c

index 9633f0bc9e9601c1f7bf936e0cb4ef4bae2152a0..0dcfdff7d1aebc13d05454afdfa53f1da5847416 100644 (file)
@@ -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.
index f97faaa0081f2541aa0de165fa73d6432e082176..3f102cf28cd31f88b6bc795a97333b9ba8002441 100644 (file)
@@ -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;
        }
     }