aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/except.c
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2007-09-04 14:37:33 -0400
committerJason Merrill <jason@gcc.gnu.org>2007-09-04 14:37:33 -0400
commitba6c89a9a9bc724db5cd063fe9263f5761e826e3 (patch)
treeb8ec68650409252db64ca5211dab9986a5a11c3e /gcc/cp/except.c
parentf202305d019c7a5d86bcbc14f9d6fe64c3fbe05b (diff)
downloadgcc-ba6c89a9a9bc724db5cd063fe9263f5761e826e3.zip
gcc-ba6c89a9a9bc724db5cd063fe9263f5761e826e3.tar.gz
gcc-ba6c89a9a9bc724db5cd063fe9263f5761e826e3.tar.bz2
re PR c++/31411 (ICE in gimplify_expr with throw/special copy constructor with initializer with a deconstructor)
PR c++/31411 * except.c (initialize_handler_parm): Put a CLEANUP_POINT_EXPR inside the MUST_NOT_THROW_EXPR. From-SVN: r128100
Diffstat (limited to 'gcc/cp/except.c')
-rw-r--r--gcc/cp/except.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/cp/except.c b/gcc/cp/except.c
index b6e8eea..3217f27 100644
--- a/gcc/cp/except.c
+++ b/gcc/cp/except.c
@@ -388,6 +388,9 @@ initialize_handler_parm (tree decl, tree exp)
See also expand_default_init. */
init = ocp_convert (TREE_TYPE (decl), init,
CONV_IMPLICIT|CONV_FORCE_TEMP, 0);
+ /* Force cleanups now to avoid nesting problems with the
+ MUST_NOT_THROW_EXPR. */
+ init = build1 (CLEANUP_POINT_EXPR, TREE_TYPE (init), init);
init = build1 (MUST_NOT_THROW_EXPR, TREE_TYPE (init), init);
}