diff options
| author | jason <jason@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-11-11 17:14:49 +0000 |
|---|---|---|
| committer | jason <jason@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-11-11 17:14:49 +0000 |
| commit | aa74adcab9f80e1dcba974b11ea3c53f2ea81f7d (patch) | |
| tree | 31f98d4599a66a5410481c3cad61fa9efd5df0e1 | |
| parent | c52ba957b5235c6e85a958f2d20d3c12f96fc5a5 (diff) | |
| download | ppe42-gcc-aa74adcab9f80e1dcba974b11ea3c53f2ea81f7d.tar.gz ppe42-gcc-aa74adcab9f80e1dcba974b11ea3c53f2ea81f7d.zip | |
PR c++/24686
* gimplify.c (gimplify_cleanup_point_expr): Also save and restore
the cleanup list.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@106786 138bc75d-0d04-0410-961f-82ee72b054a4
| -rw-r--r-- | gcc/ChangeLog | 6 | ||||
| -rw-r--r-- | gcc/gimplify.c | 6 |
2 files changed, 11 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index c9f0917d50b..7a871c4a26b 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2005-11-11 Jason Merrill <jason@redhat.com> + + PR c++/24686 + * gimplify.c (gimplify_cleanup_point_expr): Also save and restore + the cleanup list. + 2005-11-11 Zdenek Dvorak <dvorakz@suse.cz> PR rtl-optimization/22509 diff --git a/gcc/gimplify.c b/gcc/gimplify.c index 9e25aef25c2..b232112bea3 100644 --- a/gcc/gimplify.c +++ b/gcc/gimplify.c @@ -3810,14 +3810,18 @@ gimplify_cleanup_point_expr (tree *expr_p, tree *pre_p) tree temp = voidify_wrapper_expr (*expr_p, NULL); /* We only care about the number of conditions between the innermost - CLEANUP_POINT_EXPR and the cleanup. So save and reset the count. */ + CLEANUP_POINT_EXPR and the cleanup. So save and reset the count and + any cleanups collected outside the CLEANUP_POINT_EXPR. */ int old_conds = gimplify_ctxp->conditions; + tree old_cleanups = gimplify_ctxp->conditional_cleanups; gimplify_ctxp->conditions = 0; + gimplify_ctxp->conditional_cleanups = NULL_TREE; body = TREE_OPERAND (*expr_p, 0); gimplify_to_stmt_list (&body); gimplify_ctxp->conditions = old_conds; + gimplify_ctxp->conditional_cleanups = old_cleanups; for (iter = tsi_start (body); !tsi_end_p (iter); ) { |

