This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: C++ PATCH to initialize_handler_parm for c++/31411
Andrew Pinski wrote:
Can you use fold_build_cleanup_point_expr instead of "build1
(CLEANUP_POINT_EXPR" ? This should help out with creating too many
exception regions at -O0 and will keep -O0 fast.
This change doesn't create any more exception regions; we still get one
per cleanup. But sure, it wouldn't hurt to use that routine.
Tested x86_64-pc-linux-gnu, applied to trunk.
2007-09-04 Jason Merrill <jason@redhat.com>
* except.c (initialize_handler_parm): Use
fold_build_cleanup_point_expr.
--- cp/except.c
+++ cp/except.c
@@ -390,7 +390,7 @@ initialize_handler_parm (tree decl, tree exp)
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 = fold_build_cleanup_point_expr (TREE_TYPE (init), init);
init = build1 (MUST_NOT_THROW_EXPR, TREE_TYPE (init), init);
}