re PR tree-optimization/23511 (Segfault in fold_binary)
authorSebastian Pop <pop@cri.ensmp.fr>
Tue, 23 Aug 2005 08:15:13 +0000 (10:15 +0200)
committerSebastian Pop <spop@gcc.gnu.org>
Tue, 23 Aug 2005 08:15:13 +0000 (08:15 +0000)
PR tree-optimization/23511
* 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.

From-SVN: r103391

gcc/ChangeLog
gcc/tree-ssa-loop-niter.c

index 1f3f5383b4b0ed5db01559a92da1a9ce1c667f33..5de0010c69ccd99cb86b002f00c68a7614deecf9 100644 (file)
@@ -1,3 +1,9 @@
+2005-08-23  Sebastian Pop  <pop@cri.ensmp.fr>
+
+       PR tree-optimization/23511
+       * 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.
+
 2005-08-23  Jakub Jelinek  <jakub@redhat.com>
 
        PR tree-optimization/22043
index a8e4737633d5fb97011af96b87fd6801f9ee76cc..5ecdaebd08e3119491fcaefe1c4cb507cb65ffcd 100644 (file)
@@ -1460,7 +1460,9 @@ infer_loop_bounds_from_undefined (struct loop *loop)
                    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);