Commit 7ad00e13 by Eric Botcazou Committed by Eric Botcazou

* tree.c (substitute_in_expr, case 4): New case, for ARRAY_REF.

From-SVN: r104271
parent b2d16a23
2005-09-14 Eric Botcazou <ebotcazou@adacore.com>
* tree.c (substitute_in_expr, case 4): New case, for ARRAY_REF.
2005-09-14 Uros Bizjak <uros@kss-loka.si>
PR middle-end/22480
......
......@@ -2180,7 +2180,7 @@ tree
substitute_in_expr (tree exp, tree f, tree r)
{
enum tree_code code = TREE_CODE (exp);
tree op0, op1, op2;
tree op0, op1, op2, op3;
tree new;
tree inner;
......@@ -2265,6 +2265,20 @@ substitute_in_expr (tree exp, tree f, tree r)
new = fold_build3 (code, TREE_TYPE (exp), op0, op1, op2);
break;
case 4:
op0 = SUBSTITUTE_IN_EXPR (TREE_OPERAND (exp, 0), f, r);
op1 = SUBSTITUTE_IN_EXPR (TREE_OPERAND (exp, 1), f, r);
op2 = SUBSTITUTE_IN_EXPR (TREE_OPERAND (exp, 2), f, r);
op3 = SUBSTITUTE_IN_EXPR (TREE_OPERAND (exp, 3), f, r);
if (op0 == TREE_OPERAND (exp, 0) && op1 == TREE_OPERAND (exp, 1)
&& op2 == TREE_OPERAND (exp, 2)
&& op3 == TREE_OPERAND (exp, 3))
return exp;
new = fold (build4 (code, TREE_TYPE (exp), op0, op1, op2, op3));
break;
default:
gcc_unreachable ();
}
......
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