summaryrefslogtreecommitdiffstats
path: root/contrib/gcc/fold-const.c
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/gcc/fold-const.c')
-rw-r--r--contrib/gcc/fold-const.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/contrib/gcc/fold-const.c b/contrib/gcc/fold-const.c
index 1aadd30..37d99f8 100644
--- a/contrib/gcc/fold-const.c
+++ b/contrib/gcc/fold-const.c
@@ -2802,13 +2802,9 @@ operand_equal_p (tree arg0, tree arg1, unsigned int flags)
case ARRAY_REF:
case ARRAY_RANGE_REF:
- /* Operands 2 and 3 may be null.
- Compare the array index by value if it is constant first as we
- may have different types but same value here. */
+ /* Operands 2 and 3 may be null. */
return (OP_SAME (0)
- && (tree_int_cst_equal (TREE_OPERAND (arg0, 1),
- TREE_OPERAND (arg1, 1))
- || OP_SAME (1))
+ && OP_SAME (1)
&& OP_SAME_WITH_NULL (2)
&& OP_SAME_WITH_NULL (3));
OpenPOWER on IntegriCloud