Commit 9516c54e by Tristan Gingold Committed by Tristan Gingold

expr.c (expand_expr_real_2): Handle larger sizetype in POINTER_PLUS_EXPR.

2012-04-04  Tristan Gingold  <gingold@adacore.com>

	* expr.c (expand_expr_real_2): Handle larger sizetype in
	POINTER_PLUS_EXPR.

From-SVN: r186133
parent 62755fd5
2012-04-04 Tristan Gingold <gingold@adacore.com>
* expr.c (expand_expr_real_2): Handle larger sizetype in
POINTER_PLUS_EXPR.
2012-04-03 Kaz Kojima <kkojima@gcc.gnu.org> 2012-04-03 Kaz Kojima <kkojima@gcc.gnu.org>
* config/sh/t-sh (MULTILIB_MATCHES): Match m2a-single-only * config/sh/t-sh (MULTILIB_MATCHES): Match m2a-single-only
......
...@@ -7957,6 +7957,11 @@ expand_expr_real_2 (sepops ops, rtx target, enum machine_mode tmode, ...@@ -7957,6 +7957,11 @@ expand_expr_real_2 (sepops ops, rtx target, enum machine_mode tmode,
treeop1 = fold_convert_loc (loc, type, treeop1 = fold_convert_loc (loc, type,
fold_convert_loc (loc, ssizetype, fold_convert_loc (loc, ssizetype,
treeop1)); treeop1));
/* If sizetype precision is larger than pointer precision, truncate the
offset to have matching modes. */
else if (TYPE_PRECISION (sizetype) > TYPE_PRECISION (type))
treeop1 = fold_convert_loc (loc, type, treeop1);
case PLUS_EXPR: case PLUS_EXPR:
/* If we are adding a constant, a VAR_DECL that is sp, fp, or ap, and /* If we are adding a constant, a VAR_DECL that is sp, fp, or ap, and
something else, make sure we add the register to the constant and something else, make sure we add the register to the constant and
......
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