diff options
author | Jan Hubicka <jh@suse.cz> | 2013-01-17 17:27:23 +0100 |
---|---|---|
committer | Jan Hubicka <hubicka@gcc.gnu.org> | 2013-01-17 16:27:23 +0000 |
commit | 8386a7ea78a01bff975ef2cc5ad34725753e91d1 (patch) | |
tree | 59b7a6a0cee6416860e6abdc8853fc758f102954 /gcc/loop-iv.c | |
parent | 8abaebcd4c6fa25ccdd2186d8ea943eeff807938 (diff) | |
download | gcc-8386a7ea78a01bff975ef2cc5ad34725753e91d1.zip gcc-8386a7ea78a01bff975ef2cc5ad34725753e91d1.tar.gz gcc-8386a7ea78a01bff975ef2cc5ad34725753e91d1.tar.bz2 |
re PR rtl-optimization/55273 (ICE in iv_number_of_iterations, at loop-iv.c:2819)
PR tree-optimizatoin/51083
* gcc.c-torture/compile/pr51083.c: New testcase.
* loop-iv.c (iv_number_of_iterations): Consider zero iteration case.
From-SVN: r195274
Diffstat (limited to 'gcc/loop-iv.c')
-rw-r--r-- | gcc/loop-iv.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/loop-iv.c b/gcc/loop-iv.c index 62a3c6f..15f1661 100644 --- a/gcc/loop-iv.c +++ b/gcc/loop-iv.c @@ -2819,7 +2819,8 @@ iv_number_of_iterations (struct loop *loop, rtx insn, rtx condition, else { max = determine_max_iter (loop, desc, old_niter); - gcc_assert (max); + if (!max) + goto zero_iter_simplify; if (!desc->infinite && !desc->assumptions) record_niter_bound (loop, double_int::from_uhwi (max), |