From: Jakub Jelinek Date: Sat, 24 Jun 2000 19:42:58 +0000 (+0200) Subject: stmt.c (expand_decl_cleanup): Emit a dummy insn after last_unconditional_cleanup. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=ef97beff0aebd6342af56423a6affe9a6e92bf8f;p=gcc.git 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 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 9633f0bc9e9..0dcfdff7d1a 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2000-06-24 Jakub Jelinek + + * stmt.c (expand_decl_cleanup): Emit a dummy insn after + last_unconditional_cleanup. + 2000-06-24 Bernd Schmidt * tree.def (VECTOR_TYPE): New node type. diff --git a/gcc/stmt.c b/gcc/stmt.c index f97faaa0081..3f102cf28cd 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; } }