2004-05-30 Andrew Pinski <pinskia@physics.uc.edu>
* fold-const.c (fold) [case TRUTH_NOT_EXPR]: Make sure the type is
of BOOLEAN_TYPE.
From-SVN: r82456
+2004-05-30 Andrew Pinski <pinskia@physics.uc.edu>
+
+ * fold-const.c (fold) [case TRUTH_NOT_EXPR]: Make sure the type is
+ of BOOLEAN_TYPE.
+
2004-05-30 Kazu Hirata <kazu@cs.umass.edu>
* c-common.c, calls.c, cfgcleanup.c, cgraph.c, cgraphunit.c,
goto associate;
case TRUTH_NOT_EXPR:
+ /* The argument to invert_truthvalue must have Boolean type. */
+ if (TREE_CODE (TREE_TYPE (arg0)) != BOOLEAN_TYPE)
+ arg0 = fold_convert (boolean_type_node, arg0);
+
/* Note that the operand of this must be an int
and its values must be 0 or 1.
("true" is a fixed value perhaps depending on the language,