|
|
This patch fixes tree-optimization/23511. Bootstrapped and tested on
i686-linux. Committed.
* tree-ssa-loop-niter.c (infer_loop_bounds_from_undefined): Don't
handle cases where TYPE_MIN_VALUE or TYPE_MAX_VALUE are NULL_TREE.
Index: tree-ssa-loop-niter.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/tree-ssa-loop-niter.c,v
retrieving revision 2.39
diff -d -u -p -r2.39 tree-ssa-loop-niter.c
--- tree-ssa-loop-niter.c 21 Aug 2005 10:48:19 -0000 2.39
+++ tree-ssa-loop-niter.c 23 Aug 2005 08:13:05 -0000
@@ -1460,7 +1460,9 @@ infer_loop_bounds_from_undefined (struct
if (init == NULL_TREE
|| step == NULL_TREE
|| TREE_CODE (init) != INTEGER_CST
- || TREE_CODE (step) != INTEGER_CST)
+ || TREE_CODE (step) != INTEGER_CST
+ || TYPE_MIN_VALUE (type) == NULL_TREE
+ || TYPE_MAX_VALUE (type) == NULL_TREE)
break;
utype = unsigned_type_for (type);
|
|