Index: gcc/tree-ssa-forwprop.c =================================================================== --- gcc/tree-ssa-forwprop.c (revision 196158) +++ gcc/tree-ssa-forwprop.c (working copy) @@ -1791,6 +1791,7 @@ /* Try to fold (type) X op CST -> (type) (X op ((type-x) CST)). */ if (TREE_CODE (arg2) == INTEGER_CST + && !first_pass_instance && CONVERT_EXPR_CODE_P (def1_code) && INTEGRAL_TYPE_P (TREE_TYPE (def1_arg1)) && int_fits_type_p (arg2, TREE_TYPE (def1_arg1))) @@ -1814,6 +1815,7 @@ binary operation result instead of to the operands. This allows to combine successive conversions and bitwise binary operations. */ if (CONVERT_EXPR_CODE_P (def1_code) + && !first_pass_instance && CONVERT_EXPR_CODE_P (def2_code) && types_compatible_p (TREE_TYPE (def1_arg1), TREE_TYPE (def2_arg1)) /* Make sure that the conversion widens the operands, or has same