aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@libertysurf.fr>2005-02-21 08:27:14 +0100
committerEric Botcazou <ebotcazou@gcc.gnu.org>2005-02-21 07:27:14 +0000
commitee167207599d4c21b0962538fecf1269f7d1e980 (patch)
tree9afc5eb8f6b3f32272ea733644e2f80a2300694c /gcc
parenta811c6725905343415f6ba018837deae6da940a1 (diff)
downloadgcc-ee167207599d4c21b0962538fecf1269f7d1e980.zip
gcc-ee167207599d4c21b0962538fecf1269f7d1e980.tar.gz
gcc-ee167207599d4c21b0962538fecf1269f7d1e980.tar.bz2
re PR tree-optimization/18663 (ACATS ICE cc1221d expected integer_cst, have nop_expr in tree_int_cst_lt, at tree.c:3779)
PR tree-optimization/18663 * tree-ssa-dom.c (extract_range_from_cond): Return 0 if the type has variable bounds. From-SVN: r95320
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/tree-ssa-dom.c11
2 files changed, 13 insertions, 4 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 881f157..f807935 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2005-02-21 Eric Botcazou <ebotcazou@libertysurf.fr>
+
+ PR tree-optimization/18663
+ * tree-ssa-dom.c (extract_range_from_cond): Return 0
+ if the type has variable bounds.
+
2005-02-20 Kazu Hirata <kazu@cs.umass.edu>
* gcse.c: Remove an obsolete comment.
diff --git a/gcc/tree-ssa-dom.c b/gcc/tree-ssa-dom.c
index 0d34ea2..88c7f92 100644
--- a/gcc/tree-ssa-dom.c
+++ b/gcc/tree-ssa-dom.c
@@ -3189,16 +3189,19 @@ extract_range_from_cond (tree cond, tree *hi_p, tree *lo_p, int *inverted_p)
tree op1 = TREE_OPERAND (cond, 1);
tree high, low, type;
int inverted;
-
+
+ type = TREE_TYPE (op1);
+
/* Experiments have shown that it's rarely, if ever useful to
record ranges for enumerations. Presumably this is due to
the fact that they're rarely used directly. They are typically
cast into an integer type and used that way. */
- if (TREE_CODE (TREE_TYPE (op1)) != INTEGER_TYPE)
+ if (TREE_CODE (type) != INTEGER_TYPE
+ /* We don't know how to deal with types with variable bounds. */
+ || TREE_CODE (TYPE_MIN_VALUE (type)) != INTEGER_CST
+ || TREE_CODE (TYPE_MAX_VALUE (type)) != INTEGER_CST)
return 0;
- type = TREE_TYPE (op1);
-
switch (TREE_CODE (cond))
{
case EQ_EXPR: