Allow more pointer-plus folding 2015-10-30 Tom de Vries * fold-const.c (fold_unary_loc): Allow more POINTER_PLUS_EXPR folding. --- gcc/fold-const.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/gcc/fold-const.c b/gcc/fold-const.c index 47ed609..6763e80 100644 --- a/gcc/fold-const.c +++ b/gcc/fold-const.c @@ -7770,9 +7770,7 @@ fold_unary_loc (location_t loc, enum tree_code code, tree type, tree op0) that this happens when X or Y is NOP_EXPR or Y is INTEGER_CST. */ if (POINTER_TYPE_P (type) && TREE_CODE (arg0) == POINTER_PLUS_EXPR - && (TREE_CODE (TREE_OPERAND (arg0, 1)) == INTEGER_CST - || TREE_CODE (TREE_OPERAND (arg0, 0)) == NOP_EXPR - || TREE_CODE (TREE_OPERAND (arg0, 1)) == NOP_EXPR)) + && TREE_CODE (TREE_OPERAND (arg0, 0)) == NOP_EXPR) { tree arg00 = TREE_OPERAND (arg0, 0); tree arg01 = TREE_OPERAND (arg0, 1); -- 1.9.1