From: Richard Guenther Date: Fri, 8 Jul 2011 14:08:17 +0000 (+0000) Subject: fold-const.c (fold_binary_loc): Remove index +p PTR -> PTR +p index folding. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b862187a34f58510107b5e77917774518ee95b69;p=gcc.git fold-const.c (fold_binary_loc): Remove index +p PTR -> PTR +p index folding. 2011-07-08 Richard Guenther * fold-const.c (fold_binary_loc): Remove index +p PTR -> PTR +p index folding. From-SVN: r176044 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 3d1c284dbf0..1cb2ce05c80 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2011-07-08 Richard Guenther + + * fold-const.c (fold_binary_loc): Remove index +p PTR -> PTR +p index + folding. + 2011-07-08 Kai Tietz * fold-const.c (fold_truth_andor): Factored out truth_andor diff --git a/gcc/fold-const.c b/gcc/fold-const.c index 1b5683d6e7a..9640264954a 100644 --- a/gcc/fold-const.c +++ b/gcc/fold-const.c @@ -9575,13 +9575,6 @@ fold_binary_loc (location_t loc, fold_convert_loc (loc, sizetype, arg0))); - /* index +p PTR -> PTR +p index */ - if (POINTER_TYPE_P (TREE_TYPE (arg1)) - && INTEGRAL_TYPE_P (TREE_TYPE (arg0))) - return fold_build2_loc (loc, POINTER_PLUS_EXPR, type, - fold_convert_loc (loc, type, arg1), - fold_convert_loc (loc, sizetype, arg0)); - /* (PTR +p B) +p A -> PTR +p (B + A) */ if (TREE_CODE (arg0) == POINTER_PLUS_EXPR) {