Some more obvious cases in the middle-end. Next is expand_shift and callers.
Bootstrapped and tested on x86_64-unknown-linux-gnu, applied. Richard. 2011-04-29 Richard Guenther <rguent...@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. Index: gcc/tree-inline.c =================================================================== *** gcc/tree-inline.c (revision 173151) --- gcc/tree-inline.c (working copy) *************** remap_eh_region_tree_nr (tree old_t_nr, *** 1204,1210 **** old_nr = tree_low_cst (old_t_nr, 0); new_nr = remap_eh_region_nr (old_nr, id); ! return build_int_cst (NULL, new_nr); } /* Helper for copy_bb. Remap statement STMT using the inlining --- 1204,1210 ---- old_nr = tree_low_cst (old_t_nr, 0); new_nr = remap_eh_region_nr (old_nr, id); ! return build_int_cst (integer_type_node, new_nr); } /* Helper for copy_bb. Remap statement STMT using the inlining Index: gcc/predict.c =================================================================== *** gcc/predict.c (revision 173151) --- gcc/predict.c (working copy) *************** tree *** 2291,2297 **** build_predict_expr (enum br_predictor predictor, enum prediction taken) { tree t = build1 (PREDICT_EXPR, void_type_node, ! build_int_cst (NULL, predictor)); SET_PREDICT_EXPR_OUTCOME (t, taken); return t; } --- 2291,2297 ---- build_predict_expr (enum br_predictor predictor, enum prediction taken) { tree t = build1 (PREDICT_EXPR, void_type_node, ! build_int_cst (integer_type_node, predictor)); SET_PREDICT_EXPR_OUTCOME (t, taken); return t; } Index: gcc/fold-const.c =================================================================== *** gcc/fold-const.c (revision 173151) --- gcc/fold-const.c (working copy) *************** fold_binary_loc (location_t loc, *** 11533,11539 **** return fold_build2_loc (loc, RSHIFT_EXPR, type, TREE_OPERAND (arg0, 0), ! build_int_cst (NULL_TREE, pow2)); } } --- 11533,11539 ---- return fold_build2_loc (loc, RSHIFT_EXPR, type, TREE_OPERAND (arg0, 0), ! build_int_cst (integer_type_node, pow2)); } } *************** fold_binary_loc (location_t loc, *** 11565,11571 **** WARN_STRICT_OVERFLOW_MISC); sh_cnt = fold_build2_loc (loc, PLUS_EXPR, TREE_TYPE (sh_cnt), ! sh_cnt, build_int_cst (NULL_TREE, pow2)); return fold_build2_loc (loc, RSHIFT_EXPR, type, fold_convert_loc (loc, type, arg0), sh_cnt); } --- 11565,11573 ---- WARN_STRICT_OVERFLOW_MISC); sh_cnt = fold_build2_loc (loc, PLUS_EXPR, TREE_TYPE (sh_cnt), ! 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); }