summaryrefslogtreecommitdiffstats
path: root/gcc/fold-const.c
diff options
context:
space:
mode:
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2011-04-29 13:11:18 +0000
committerrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2011-04-29 13:11:18 +0000
commitb3d480fb6aea674b3f3ed68dd2c87509b7d5e978 (patch)
tree9944088576a00cf7b79e01597771ae2db283896d /gcc/fold-const.c
parentd534cab00feb1d9fff39265c960d143d31ee0635 (diff)
downloadppe42-gcc-b3d480fb6aea674b3f3ed68dd2c87509b7d5e978.tar.gz
ppe42-gcc-b3d480fb6aea674b3f3ed68dd2c87509b7d5e978.zip
2011-04-29 Richard Guenther <rguenther@suse.de>
* tree-inline.c (remap_eh_region_tree_nr): Use integer_type_node for the remapped region number. * predict.c (build_predict_expr): Use integer_type_node for the predict kind. * fold-const.c (fold_binary_loc): Use integer_type_node for the shift amount. Use a proper type for the PLUS_EXPR operand. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@173156 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/fold-const.c')
-rw-r--r--gcc/fold-const.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/gcc/fold-const.c b/gcc/fold-const.c
index 1aa0dec0011..1daebbd3ad8 100644
--- a/gcc/fold-const.c
+++ b/gcc/fold-const.c
@@ -11533,7 +11533,7 @@ fold_binary_loc (location_t loc,
return fold_build2_loc (loc, RSHIFT_EXPR, type,
TREE_OPERAND (arg0, 0),
- build_int_cst (NULL_TREE, pow2));
+ build_int_cst (integer_type_node, pow2));
}
}
@@ -11565,7 +11565,9 @@ fold_binary_loc (location_t loc,
WARN_STRICT_OVERFLOW_MISC);
sh_cnt = fold_build2_loc (loc, PLUS_EXPR, TREE_TYPE (sh_cnt),
- sh_cnt, build_int_cst (NULL_TREE, pow2));
+ sh_cnt,
+ build_int_cst (TREE_TYPE (sh_cnt),
+ pow2));
return fold_build2_loc (loc, RSHIFT_EXPR, type,
fold_convert_loc (loc, type, arg0), sh_cnt);
}
OpenPOWER on IntegriCloud