summaryrefslogtreecommitdiff
path: root/gcc/cp/pt.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/cp/pt.c')
-rw-r--r--gcc/cp/pt.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c
index ee6f85ac4be..15d5fdfd0f8 100644
--- a/gcc/cp/pt.c
+++ b/gcc/cp/pt.c
@@ -2599,7 +2599,7 @@ push_template_decl_real (decl, is_friend)
if (primary)
DECL_PRIMARY_TEMPLATE (tmpl) = tmpl;
- info = perm_tree_cons (tmpl, args, NULL_TREE);
+ info = perm_tree_cons (tmpl, copy_to_permanent (args), NULL_TREE);
if (DECL_IMPLICIT_TYPEDEF_P (decl))
{
@@ -7465,14 +7465,11 @@ tsubst_expr (t, args, complain, in_decl)
lineno = STMT_LINENO (t);
stmt = begin_handler ();
if (HANDLER_PARMS (t))
- {
- tree d = HANDLER_PARMS (t);
- expand_start_catch_block
- (tsubst (TREE_OPERAND (d, 1), args, complain, in_decl),
- tsubst (TREE_OPERAND (d, 0), args, complain, in_decl));
- }
+ expand_start_catch_block
+ (tsubst (DECL_STMT_DECL (HANDLER_PARMS (t)),
+ args, complain, in_decl));
else
- expand_start_catch_block (NULL_TREE, NULL_TREE);
+ expand_start_catch_block (NULL_TREE);
finish_handler_parms (stmt);
tsubst_expr (HANDLER_BODY (t), args, complain, in_decl);
finish_handler (stmt);