diff options
author | Jason Merrill <jason@casey.soma.redhat.com> | 2000-05-25 00:36:28 +0000 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 2000-05-24 20:36:28 -0400 |
commit | 04da69d3a6eeb4b9cbd3efc5473d063577e66d58 (patch) | |
tree | b9f9d3bf37a330de34f1b5904bfcda3da2d1df3e | |
parent | 392b631661531c16c691310bb78b9af861537cca (diff) | |
download | gcc-04da69d3a6eeb4b9cbd3efc5473d063577e66d58.zip gcc-04da69d3a6eeb4b9cbd3efc5473d063577e66d58.tar.gz gcc-04da69d3a6eeb4b9cbd3efc5473d063577e66d58.tar.bz2 |
stmt.c (expand_end_bindings): Look through NOTEs to find a BARRIER.
* stmt.c (expand_end_bindings): Look through NOTEs to find a
BARRIER.
From-SVN: r34149
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/stmt.c | 10 |
2 files changed, 13 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 27b5554..0ff533f 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2000-05-24 Jason Merrill <jason@casey.soma.redhat.com> + + * stmt.c (expand_end_bindings): Look through NOTEs to find a + BARRIER. + 2000-05-24 Mark Mitchell <mark@codesourcery.com> * calls.c (expand_call): Handle cleanups in tail-recursion @@ -3675,8 +3675,8 @@ expand_end_bindings (vars, mark_ends, dont_jump_in) if (thisblock->data.block.stack_level != 0 || thisblock->data.block.cleanups != 0) { - /* Only clean up here if this point can actually be reached. */ - int reachable = GET_CODE (get_last_insn ()) != BARRIER; + int reachable; + rtx insn; /* Don't let cleanups affect ({...}) constructs. */ int old_expr_stmts_for_value = expr_stmts_for_value; @@ -3684,6 +3684,12 @@ expand_end_bindings (vars, mark_ends, dont_jump_in) tree old_last_expr_type = last_expr_type; expr_stmts_for_value = 0; + /* Only clean up here if this point can actually be reached. */ + insn = get_last_insn (); + if (GET_CODE (insn) == NOTE) + insn = prev_nonnote_insn (insn); + reachable = GET_CODE (insn) != BARRIER; + /* Do the cleanups. */ expand_cleanups (thisblock->data.block.cleanups, NULL_TREE, 0, reachable); if (reachable) |