+Sun Sep 20 12:35:55 1998 Richard Henderson <rth@cygnus.com>
+
+ * fold-const.c (fold): Yet another COND_EXPR bug: when folding
+ to an ABS expr, convert an unsigned input to signed.
+
Sun Sep 20 12:14:45 1998 Jeffrey A Law (law@cygnus.com)
* fold-const.c (fold): Fix another type in COND_EXPR handling code.
return pedantic_non_lvalue (convert (type, arg1));
case GE_EXPR:
case GT_EXPR:
+ if (TREE_UNSIGNED (TREE_TYPE (arg1)))
+ arg1 = convert (signed_type (TREE_TYPE (arg1)), arg1);
return pedantic_non_lvalue
(convert (type, fold (build1 (ABS_EXPR,
TREE_TYPE (arg1), arg1))));
case LE_EXPR:
case LT_EXPR:
+ if (TREE_UNSIGNED (TREE_TYPE (arg1)))
+ arg1 = convert (signed_type (TREE_TYPE (arg1)), arg1);
return pedantic_non_lvalue
(fold (build1 (NEGATE_EXPR, type,
convert (type,