Commit b862187a by Richard Guenther Committed by Richard Biener

fold-const.c (fold_binary_loc): Remove index +p PTR -> PTR +p index folding.

2011-07-08  Richard Guenther  <rguenther@suse.de>

	* fold-const.c (fold_binary_loc): Remove index +p PTR -> PTR +p index
	folding.

From-SVN: r176044
parent e8e8c74b
2011-07-08 Richard Guenther <rguenther@suse.de>
* fold-const.c (fold_binary_loc): Remove index +p PTR -> PTR +p index
folding.
2011-07-08 Kai Tietz <ktietz@redhat.com>
* fold-const.c (fold_truth_andor): Factored out truth_andor
......
......@@ -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)
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment