PR c/20187
* fold-const.c (fold): When shortening comparisons of widened operands,
check whether the tree returned by get_unwidened really is wider.
From-SVN: r102495
+2005-07-28 Richard Sandiford <richard@codesourcery.com>
+
+ PR c/20187
+ * fold-const.c (fold): When shortening comparisons of widened operands,
+ check whether the tree returned by get_unwidened really is wider.
+
2005-07-28 Richard Sandiford <richard@codesourcery.com>
PR c/22589
else if (TREE_CODE (TREE_TYPE (arg0)) == INTEGER_TYPE
&& TREE_CODE (arg0) == NOP_EXPR
&& (tem = get_unwidened (arg0, NULL_TREE)) != arg0
+ && (TYPE_PRECISION (TREE_TYPE (tem))
+ > TYPE_PRECISION (TREE_TYPE (arg0)))
&& (code == EQ_EXPR || code == NE_EXPR
|| TREE_UNSIGNED (TREE_TYPE (arg0))
== TREE_UNSIGNED (TREE_TYPE (tem)))
+2005-07-28 Richard Sandiford <richard@codesourcery.com>
+
+ PR c/20187
+ * gcc.c-torture/execute/pr20187-1.c: New test.
+
2005-07-28 Giovanni Bajo <giovannibajo@gcc.gnu.org>
Backport: