Commit fa74fa39 by Eric Botcazou Committed by Eric Botcazou

tree.c (substitute_placeholder_in_expr) <tcc_vl_exp>: Minor tweak.

From-SVN: r135591
parent 9479cae3
2008-05-19 Eric Botcazou <ebotcazou@adacore.com> 2008-05-19 Eric Botcazou <ebotcazou@adacore.com>
* tree.c (substitute_in_expr) <tcc_vl_exp>: Fix thinko. * tree.c (substitute_in_expr) <tcc_vl_exp>: Fix thinko.
(substitute_placeholder_in_expr) <tcc_vl_exp>: Minor tweak.
2008-05-19 H.J. Lu <hongjiu.lu@intel.com> 2008-05-19 H.J. Lu <hongjiu.lu@intel.com>
......
...@@ -2778,18 +2778,19 @@ substitute_placeholder_in_expr (tree exp, tree obj) ...@@ -2778,18 +2778,19 @@ substitute_placeholder_in_expr (tree exp, tree obj)
{ {
tree copy = NULL_TREE; tree copy = NULL_TREE;
int i; int i;
int n = TREE_OPERAND_LENGTH (exp);
for (i = 1; i < n; i++) for (i = 1; i < TREE_OPERAND_LENGTH (exp); i++)
{ {
tree op = TREE_OPERAND (exp, i); tree op = TREE_OPERAND (exp, i);
tree newop = SUBSTITUTE_PLACEHOLDER_IN_EXPR (op, obj); tree new_op = SUBSTITUTE_PLACEHOLDER_IN_EXPR (op, obj);
if (newop != op) if (new_op != op)
{ {
if (!copy) if (!copy)
copy = copy_node (exp); copy = copy_node (exp);
TREE_OPERAND (copy, i) = newop; TREE_OPERAND (copy, i) = new_op;
} }
} }
if (copy) if (copy)
return fold (copy); return fold (copy);
else else
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment