diff options
author | Eric Botcazou <ebotcazou@adacore.com> | 2005-09-14 15:04:56 +0000 |
---|---|---|
committer | Eric Botcazou <ebotcazou@gcc.gnu.org> | 2005-09-14 15:04:56 +0000 |
commit | 7ad00e132508704abc2fd3d785b42ab4310880a4 (patch) | |
tree | 6a59c7c852670aa476571033500d19f39f08e230 /gcc | |
parent | b2d16a23f1f032c1104db7bb015535b9735aa94a (diff) | |
download | gcc-7ad00e132508704abc2fd3d785b42ab4310880a4.zip gcc-7ad00e132508704abc2fd3d785b42ab4310880a4.tar.gz gcc-7ad00e132508704abc2fd3d785b42ab4310880a4.tar.bz2 |
* tree.c (substitute_in_expr, case 4): New case, for ARRAY_REF.
From-SVN: r104271
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/tree.c | 16 |
2 files changed, 19 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 191cdc2..41a1bb3 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +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 (); } |