aboutsummaryrefslogtreecommitdiff
path: root/gcc/fold-const.c
diff options
context:
space:
mode:
authorRichard Guenther <rguenther@suse.de>2008-12-30 10:28:01 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2008-12-30 10:28:01 +0000
commitb0331ccbe2cd52043b328f1bbd07f8f75bc9b97e (patch)
tree9d001283408b27bd22fd3e7978b27d4df23a90a6 /gcc/fold-const.c
parent1721382102e3b912f547d92fdfe7309225dd79d6 (diff)
downloadgcc-b0331ccbe2cd52043b328f1bbd07f8f75bc9b97e.zip
gcc-b0331ccbe2cd52043b328f1bbd07f8f75bc9b97e.tar.gz
gcc-b0331ccbe2cd52043b328f1bbd07f8f75bc9b97e.tar.bz2
re PR tree-optimization/38564 (Revision 142662 caused ICE in insert_into_preds_of_block)
2008-12-30 Richard Guenther <rguenther@suse.de> PR middle-end/38564 * fold-const.c (fold_comparison): Use the correct result type. * gcc.c-torture/compile/pr38564.c: New testcase. From-SVN: r142961
Diffstat (limited to 'gcc/fold-const.c')
-rw-r--r--gcc/fold-const.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/gcc/fold-const.c b/gcc/fold-const.c
index 74a0a87..be542b7 100644
--- a/gcc/fold-const.c
+++ b/gcc/fold-const.c
@@ -9036,17 +9036,17 @@ fold_comparison (enum tree_code code, tree type, tree op0, tree op1)
switch (code)
{
case EQ_EXPR:
- return build_int_cst (boolean_type_node, bitpos0 == bitpos1);
+ return constant_boolean_node (bitpos0 == bitpos1, type);
case NE_EXPR:
- return build_int_cst (boolean_type_node, bitpos0 != bitpos1);
+ return constant_boolean_node (bitpos0 != bitpos1, type);
case LT_EXPR:
- return build_int_cst (boolean_type_node, bitpos0 < bitpos1);
+ return constant_boolean_node (bitpos0 < bitpos1, type);
case LE_EXPR:
- return build_int_cst (boolean_type_node, bitpos0 <= bitpos1);
+ return constant_boolean_node (bitpos0 <= bitpos1, type);
case GE_EXPR:
- return build_int_cst (boolean_type_node, bitpos0 >= bitpos1);
+ return constant_boolean_node (bitpos0 >= bitpos1, type);
case GT_EXPR:
- return build_int_cst (boolean_type_node, bitpos0 > bitpos1);
+ return constant_boolean_node (bitpos0 > bitpos1, type);
default:;
}
}