From: Mark Mitchell Date: Fri, 24 Sep 1999 01:14:54 +0000 (+0000) Subject: stmt.c (expand_start_bindings): Don't allow cleanup isntructions to disappear. X-Git-Tag: prereleases/libstdc++-2.92~10378 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a571f7a00e33edb193e1a74869dab3f0576eb87c;p=thirdparty%2Fgcc.git stmt.c (expand_start_bindings): Don't allow cleanup isntructions to disappear. * stmt.c (expand_start_bindings): Don't allow cleanup isntructions to disappear. From-SVN: r29644 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index f2002c1bfa36..c10d22af4742 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +Thu Sep 23 18:18:55 1999 Mark Mitchell + + * stmt.c (expand_start_bindings): Don't allow cleanup isntructions + to disappear. + Thu Sep 23 18:07:01 1999 Mark Mitchell * optabs.c (init_traps): Register trap_rtx as a GC root. diff --git a/gcc/stmt.c b/gcc/stmt.c index f2180bf4944d..265f365a8a17 100644 --- a/gcc/stmt.c +++ b/gcc/stmt.c @@ -3230,6 +3230,13 @@ expand_start_bindings (flags) thisblock->data.block.conditional_code = 0; thisblock->data.block.last_unconditional_cleanup = note; + /* 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; if (block_stack