aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.6/gcc/cp/tree.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.6/gcc/cp/tree.c')
-rw-r--r--gcc-4.6/gcc/cp/tree.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/gcc-4.6/gcc/cp/tree.c b/gcc-4.6/gcc/cp/tree.c
index 1fa32a015..6a39cc9e4 100644
--- a/gcc-4.6/gcc/cp/tree.c
+++ b/gcc-4.6/gcc/cp/tree.c
@@ -1840,7 +1840,11 @@ bot_manip (tree* tp, int* walk_subtrees, void* data)
tree u;
if (TREE_CODE (TREE_OPERAND (t, 1)) == AGGR_INIT_EXPR)
- u = build_cplus_new (TREE_TYPE (t), TREE_OPERAND (t, 1));
+ {
+ u = build_cplus_new (TREE_TYPE (t), TREE_OPERAND (t, 1));
+ if (AGGR_INIT_ZERO_FIRST (TREE_OPERAND (t, 1)))
+ AGGR_INIT_ZERO_FIRST (TREE_OPERAND (u, 1)) = true;
+ }
else
u = build_target_expr_with_type (TREE_OPERAND (t, 1), TREE_TYPE (t));
@@ -1861,7 +1865,11 @@ bot_manip (tree* tp, int* walk_subtrees, void* data)
}
/* Make a copy of this node. */
- return copy_tree_r (tp, walk_subtrees, NULL);
+ t = copy_tree_r (tp, walk_subtrees, NULL);
+ if (TREE_CODE (*tp) == CALL_EXPR && !TREE_NOTHROW (*tp)
+ && cfun && cp_function_chain)
+ cp_function_chain->can_throw = 1;
+ return t;
}
/* Replace all remapped VAR_DECLs in T with their new equivalents.