aboutsummaryrefslogtreecommitdiff
path: root/gcc/stmt.c
diff options
context:
space:
mode:
authorMark Mitchell <mark@codesourcery.com>1999-09-24 01:14:54 +0000
committerMark Mitchell <mmitchel@gcc.gnu.org>1999-09-24 01:14:54 +0000
commita571f7a00e33edb193e1a74869dab3f0576eb87c (patch)
tree393df4ea10315f15ce843bb2005c46512faa3f69 /gcc/stmt.c
parent541b0512b1977c888dc08b99076cee97997c950d (diff)
downloadgcc-a571f7a00e33edb193e1a74869dab3f0576eb87c.zip
gcc-a571f7a00e33edb193e1a74869dab3f0576eb87c.tar.gz
gcc-a571f7a00e33edb193e1a74869dab3f0576eb87c.tar.bz2
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
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 f2180bf..265f365 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