summaryrefslogtreecommitdiff
path: root/gcc/gimplify.c
diff options
context:
space:
mode:
authorktietz <ktietz@138bc75d-0d04-0410-961f-82ee72b054a4>2011-05-13 09:21:36 +0000
committerktietz <ktietz@138bc75d-0d04-0410-961f-82ee72b054a4>2011-05-13 09:21:36 +0000
commit008eaf24239fee237fcef2e8cdae1187b6f87125 (patch)
treeb9fe9897580218fb11ab97f038d60ac06c7ebad7 /gcc/gimplify.c
parentb43efa05f9c72902e0026321007e4ccb689c1c35 (diff)
downloadgcc-008eaf24239fee237fcef2e8cdae1187b6f87125.tar.gz
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@173726 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/gimplify.c')
-rw-r--r--gcc/gimplify.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/gcc/gimplify.c b/gcc/gimplify.c
index c54d3b5dcfc..33a76a266a8 100644
--- a/gcc/gimplify.c
+++ b/gcc/gimplify.c
@@ -2848,7 +2848,7 @@ gimple_boolify (tree expr)
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);
}
@@ -6754,7 +6754,7 @@ gimplify_expr (tree *expr_p, gimple_seq *pre_p, gimple_seq *post_p,
}
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));
@@ -7199,7 +7199,7 @@ gimplify_expr (tree *expr_p, gimple_seq *pre_p, gimple_seq *post_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;