diff options
Diffstat (limited to 'gcc/fold-const.c')
-rw-r--r-- | gcc/fold-const.c | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/gcc/fold-const.c b/gcc/fold-const.c index 32863e6b4e8..eb7d7c91210 100644 --- a/gcc/fold-const.c +++ b/gcc/fold-const.c @@ -9864,20 +9864,6 @@ fold_binary (enum tree_code code, tree type, tree op0, tree op1) return NULL_TREE; case PLUS_EXPR: - /* PTR + INT -> (INT)(PTR p+ INT) */ - if (POINTER_TYPE_P (TREE_TYPE (arg0)) - && INTEGRAL_TYPE_P (TREE_TYPE (arg1))) - return fold_convert (type, fold_build2 (POINTER_PLUS_EXPR, - TREE_TYPE (arg0), - arg0, - fold_convert (sizetype, arg1))); - /* INT + PTR -> (INT)(PTR p+ INT) */ - if (POINTER_TYPE_P (TREE_TYPE (arg1)) - && INTEGRAL_TYPE_P (TREE_TYPE (arg0))) - return fold_convert (type, fold_build2 (POINTER_PLUS_EXPR, - TREE_TYPE (arg1), - arg1, - fold_convert (sizetype, arg0))); /* A + (-B) -> A - B */ if (TREE_CODE (arg1) == NEGATE_EXPR) return fold_build2 (MINUS_EXPR, type, |