aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-cfg.c
diff options
context:
space:
mode:
authorRichard Guenther <rguenther@suse.de>2007-07-20 18:10:57 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2007-07-20 18:10:57 +0000
commitd40055abb19399588b3dbeeefc76daaf227045fd (patch)
tree556ceba04b72aa441d18c7f074ee5a57244e0fec /gcc/tree-cfg.c
parent4d40a94f24868bb8b78586826ede11be038539d3 (diff)
downloadgcc-d40055abb19399588b3dbeeefc76daaf227045fd.zip
gcc-d40055abb19399588b3dbeeefc76daaf227045fd.tar.gz
gcc-d40055abb19399588b3dbeeefc76daaf227045fd.tar.bz2
tree-cfg.c (verify_expr): COND_EXPRs can have any integral typed condition.
2007-07-20 Richard Guenther <rguenther@suse.de> * tree-cfg.c (verify_expr): COND_EXPRs can have any integral typed condition. * tree-ssa.c (useless_type_conversion_p): Do not preserve booleanness. Only preserve conversions from a non-base type to a base type, not in general between types with different TYPE_MIN_VALUE or TYPE_MAX_VALUE. * tree.def (COND_EXPR): Document that the condition can be of any integral type. From-SVN: r126804
Diffstat (limited to 'gcc/tree-cfg.c')
-rw-r--r--gcc/tree-cfg.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/tree-cfg.c b/gcc/tree-cfg.c
index 09fe7eb..889e7d7 100644
--- a/gcc/tree-cfg.c
+++ b/gcc/tree-cfg.c
@@ -3201,9 +3201,9 @@ verify_expr (tree *tp, int *walk_subtrees, void *data ATTRIBUTE_UNUSED)
case COND_EXPR:
x = COND_EXPR_COND (t);
- if (TREE_CODE (TREE_TYPE (x)) != BOOLEAN_TYPE)
+ if (!INTEGRAL_TYPE_P (TREE_TYPE (x)))
{
- error ("non-boolean used in condition");
+ error ("non-integral used in condition");
return x;
}
if (!is_gimple_condexpr (x))