summaryrefslogtreecommitdiff
path: root/gcc/loop-unroll.c
diff options
context:
space:
mode:
authorMartin Liska <mliska@suse.cz>2017-12-19 14:20:07 +0100
committerMartin Liska <marxin@gcc.gnu.org>2017-12-19 13:20:07 +0000
commitf389e7983bc89fb3d6041d676de7e313892d5ede (patch)
tree9d3681d44ed6fb432c4644a795f6c9f0de241d1e /gcc/loop-unroll.c
parenteefc884f314f76c81a64b390ac99b6c32ec45ce9 (diff)
Fix off by one error in loop-unroll.c (PR rtl-optimization/82675).
2017-12-19 Martin Liska <mliska@suse.cz> PR rtl-optimization/82675 * loop-unroll.c (unroll_loop_constant_iterations): Allocate one more element in sbitmap. From-SVN: r255818
Diffstat (limited to 'gcc/loop-unroll.c')
-rw-r--r--gcc/loop-unroll.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/loop-unroll.c b/gcc/loop-unroll.c
index cc154da9686..b9d01ffe066 100644
--- a/gcc/loop-unroll.c
+++ b/gcc/loop-unroll.c
@@ -498,7 +498,7 @@ unroll_loop_constant_iterations (struct loop *loop)
exit_mod = niter % (max_unroll + 1);
- auto_sbitmap wont_exit (max_unroll + 1);
+ auto_sbitmap wont_exit (max_unroll + 2);
bitmap_ones (wont_exit);
auto_vec<edge> remove_edges;