diff options
author | Eric Botcazou <ebotcazou@adacore.com> | 2008-04-07 09:47:43 +0000 |
---|---|---|
committer | Eric Botcazou <ebotcazou@gcc.gnu.org> | 2008-04-07 09:47:43 +0000 |
commit | 39fcde8ff2ba378999f0466b8d65c233042c51b6 (patch) | |
tree | 5f52e504245f353cbf4c7ab73aff6c9c36257959 /gcc/ada/utils2.c | |
parent | 9dd9bf80a87fdd119261f5efb8a9ceceffb12963 (diff) | |
download | gcc-39fcde8ff2ba378999f0466b8d65c233042c51b6.zip gcc-39fcde8ff2ba378999f0466b8d65c233042c51b6.tar.gz gcc-39fcde8ff2ba378999f0466b8d65c233042c51b6.tar.bz2 |
fold-const.c (fold): New case.
* fold-const.c (fold) <ARRAY_REF>: New case. Try to fold constant
reference in constructor with non self-referential type.
ada/
* utils2.c (build_binary_op): Fold ARRAY_REF and ARRAY_RANGE_REF too.
From-SVN: r133977
Diffstat (limited to 'gcc/ada/utils2.c')
-rw-r--r-- | gcc/ada/utils2.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/ada/utils2.c b/gcc/ada/utils2.c index e990867..8eddde2 100644 --- a/gcc/ada/utils2.c +++ b/gcc/ada/utils2.c @@ -1017,8 +1017,8 @@ build_binary_op (enum tree_code op_code, tree result_type, else if (TREE_CODE (right_operand) == NULL_EXPR) return build1 (NULL_EXPR, operation_type, TREE_OPERAND (right_operand, 0)); else if (op_code == ARRAY_REF || op_code == ARRAY_RANGE_REF) - result = build4 (op_code, operation_type, left_operand, - right_operand, NULL_TREE, NULL_TREE); + result = fold (build4 (op_code, operation_type, left_operand, + right_operand, NULL_TREE, NULL_TREE)); else result = fold_build2 (op_code, operation_type, left_operand, right_operand); |