diff options
author | Sebastian Pop <pop@cri.ensmp.fr> | 2005-08-23 10:15:13 +0200 |
---|---|---|
committer | Sebastian Pop <spop@gcc.gnu.org> | 2005-08-23 08:15:13 +0000 |
commit | ce8f9416becbb4a98583e9cbd16a281b70a68938 (patch) | |
tree | 036e5ee218fbbfada8c97099b95ccbfa5bb690ee /gcc/tree-ssa-loop-niter.c | |
parent | 73ed17ff80da57d02cdb33b0035d5e718ed39fa2 (diff) | |
download | gcc-ce8f9416becbb4a98583e9cbd16a281b70a68938.zip gcc-ce8f9416becbb4a98583e9cbd16a281b70a68938.tar.gz gcc-ce8f9416becbb4a98583e9cbd16a281b70a68938.tar.bz2 |
re PR tree-optimization/23511 (Segfault in fold_binary)
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
Diffstat (limited to 'gcc/tree-ssa-loop-niter.c')
-rw-r--r-- | gcc/tree-ssa-loop-niter.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/tree-ssa-loop-niter.c b/gcc/tree-ssa-loop-niter.c index a8e4737..5ecdaeb 100644 --- a/gcc/tree-ssa-loop-niter.c +++ b/gcc/tree-ssa-loop-niter.c @@ -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); |