+2015-07-14 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/66863
+ * tree-vrp.c (register_edge_assert_for_2): Properly restrict
+ what we record for conversion use stmt lhs inequalities.
+
2015-07-14 Richard Biener <rguenther@suse.de>
* genmatch.c (dt_node::gen_kids_1): Fix case label indenting.
+2015-07-14 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/66863
+ * gcc.dg/torture/pr66863.c: New testcase.
+
2015-07-13 Patrick Palka <ppalka@gcc.gnu.org>
PR c++/65186
cst = int_const_binop (code, val, cst);
}
else if (CONVERT_EXPR_CODE_P (code))
- cst = fold_convert (TREE_TYPE (name2), val);
+ {
+ /* For truncating conversions require that the constant
+ fits in the truncated type if we are going to record
+ an inequality. */
+ if (comp_code == NE_EXPR
+ && (TYPE_PRECISION (TREE_TYPE (name2))
+ < TYPE_PRECISION (TREE_TYPE (name)))
+ && ! int_fits_type_p (val, TREE_TYPE (name2)))
+ continue;
+ cst = fold_convert (TREE_TYPE (name2), val);
+ }
else
continue;