diff options
author | Jason Merrill <jason@gcc.gnu.org> | 2000-08-30 19:43:53 -0400 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 2000-08-30 19:43:53 -0400 |
commit | 495d26d6ce58caf1f86a1039b0c44e1b23878bc6 (patch) | |
tree | 76823eddd472172198bd2797b111c717108319a8 /gcc/cp/tree.c | |
parent | bf6a611300aeb0f06626e926d8dbc503a4726d0e (diff) | |
download | gcc-495d26d6ce58caf1f86a1039b0c44e1b23878bc6.zip gcc-495d26d6ce58caf1f86a1039b0c44e1b23878bc6.tar.gz gcc-495d26d6ce58caf1f86a1039b0c44e1b23878bc6.tar.bz2 |
cp-tree.h (LOCAL_CLASS_P): Use decl_function_context.
* cp-tree.h (LOCAL_CLASS_P): Use decl_function_context.
* tree.c (bot_manip): Check TREE_CONSTANT rather than
!TREE_SIDE_EFFECTS. Call break_out_target_exprs and
build_target_expr_with_type for the non-AGGR_INIT_EXPR case.
* decl.c (start_function): Always call make_function_rtl.
From-SVN: r36080
Diffstat (limited to 'gcc/cp/tree.c')
-rw-r--r-- | gcc/cp/tree.c | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/gcc/cp/tree.c b/gcc/cp/tree.c index cd7d45f..009cb0e 100644 --- a/gcc/cp/tree.c +++ b/gcc/cp/tree.c @@ -1649,13 +1649,15 @@ bot_manip (tp, walk_subtrees, data) splay_tree target_remap = ((splay_tree) data); tree t = *tp; - if (TREE_CODE (t) != TREE_LIST && ! TREE_SIDE_EFFECTS (t)) + if (TREE_CONSTANT (t)) { - /* There can't be any TARGET_EXPRs below this point. */ + /* There can't be any TARGET_EXPRs or their slot variables below + this point. We used to check !TREE_SIDE_EFFECTS, but then we + failed to copy an ADDR_EXPR of the slot VAR_DECL. */ *walk_subtrees = 0; return NULL_TREE; } - else if (TREE_CODE (t) == TARGET_EXPR) + if (TREE_CODE (t) == TARGET_EXPR) { tree u; @@ -1667,13 +1669,8 @@ bot_manip (tp, walk_subtrees, data) } else { - tree var; - - u = copy_node (t); - var = build (VAR_DECL, TREE_TYPE (t)); - DECL_CONTEXT (var) = current_function_decl; - layout_decl (var, 0); - TREE_OPERAND (u, 0) = var; + u = build_target_expr_with_type + (break_out_target_exprs (TREE_OPERAND (t, 1)), TREE_TYPE (t)); } /* Map the old variable to the new one. */ |