+2011-05-13 Kai Tietz <ktietz@redhat.com>
+
+ PR middle-end/48984
+ * gimplify.c (gimplify_expr): Check for boolean_type_node instead
+ for BOOLEAN_TYPE for TRUTH-NOT/AND/OR/XOR.
+ (gimple_boolify): Check for cast for boolean_type_node instead for
+ BOOLEAN_TYPE.
+
2011-05-13 Richard Guenther <rguenther@suse.de>
PR tree-optimization/48172
default:
/* Other expressions that get here must have boolean values, but
might need to be converted to the appropriate mode. */
- if (TREE_CODE (type) == BOOLEAN_TYPE)
+ if (type == boolean_type_node)
return expr;
return fold_convert_loc (loc, boolean_type_node, expr);
}
}
case TRUTH_NOT_EXPR:
- if (TREE_CODE (TREE_TYPE (*expr_p)) != BOOLEAN_TYPE)
+ if (TREE_TYPE (*expr_p) != boolean_type_node)
{
tree type = TREE_TYPE (*expr_p);
*expr_p = fold_convert (type, gimple_boolify (*expr_p));
fold_truth_not_expr) happily uses operand type and doesn't
automatically uses boolean_type as result, we need to keep
orignal type. */
- if (TREE_CODE (org_type) != BOOLEAN_TYPE)
+ if (org_type != boolean_type_node)
{
*expr_p = fold_convert (org_type, *expr_p);
ret = GS_OK;