diff options
| author | Mark Mitchell <mark@codesourcery.com> | 1999-12-09 19:13:33 +0000 |
|---|---|---|
| committer | Mark Mitchell <mmitchel@gcc.gnu.org> | 1999-12-09 19:13:33 +0000 |
| commit | 3eb24f739e0576e8370a1aa540950ec9555e62b2 (patch) | |
| tree | 989046ebc48794210cbe94bbfea638ed07c2c931 /gcc/cp/tree.c | |
| parent | 1e54d32b0524638e375a871ef3cb6b8897ce203c (diff) | |
| download | gcc-3eb24f739e0576e8370a1aa540950ec9555e62b2.zip gcc-3eb24f739e0576e8370a1aa540950ec9555e62b2.tar.gz gcc-3eb24f739e0576e8370a1aa540950ec9555e62b2.tar.bz2 | |
decl.c (init_decl_processing): Reenable inlining on trees.
* decl.c (init_decl_processing): Reenable inlining on trees.
(finish_function): Likewise.
* expr.c (cplus_expand_expr): Don't handle AGGR_INIT_EXPR here.
* semantics.c (simplify_aggr_init_exprs): New function.
(expand_body): Use it.
* tree.c (walk_tree): Special-case TARGET_EXPRs since they
sometimes present the same sub-tree twice.
From-SVN: r30849
Diffstat (limited to 'gcc/cp/tree.c')
| -rw-r--r-- | gcc/cp/tree.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/gcc/cp/tree.c b/gcc/cp/tree.c index 1cabf82..31fbec0 100644 --- a/gcc/cp/tree.c +++ b/gcc/cp/tree.c @@ -1626,8 +1626,18 @@ walk_tree (tp, func, data) int i; /* Walk over all the sub-trees of this operand. */ - for (i = first_rtl_op (code) - 1; i >= 0; --i) - WALK_SUBTREE (TREE_OPERAND (*tp, i)); + i = first_rtl_op (code) - 1; + /* TARGET_EXPRs are peculiar: operands 1 and 3 can be the same. + But, we only want to walk once. */ + if (code == TARGET_EXPR + && TREE_OPERAND (*tp, 3) == TREE_OPERAND (*tp, 1)) + --i; + /* Go through the subtrees. */ + while (i >= 0) + { + WALK_SUBTREE (TREE_OPERAND (*tp, i)); + --i; + } /* For statements, we also walk the chain so that we cover the entire statement tree. */ |
