diff options
author | Martin Liska <mliska@suse.cz> | 2017-12-19 14:20:07 +0100 |
---|---|---|
committer | Martin Liska <marxin@gcc.gnu.org> | 2017-12-19 13:20:07 +0000 |
commit | f389e7983bc89fb3d6041d676de7e313892d5ede (patch) | |
tree | 9d3681d44ed6fb432c4644a795f6c9f0de241d1e /gcc | |
parent | eefc884f314f76c81a64b390ac99b6c32ec45ce9 (diff) | |
download | gcc-f389e7983bc89fb3d6041d676de7e313892d5ede.zip gcc-f389e7983bc89fb3d6041d676de7e313892d5ede.tar.gz gcc-f389e7983bc89fb3d6041d676de7e313892d5ede.tar.bz2 |
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')
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/loop-unroll.c | 2 |
2 files changed, 7 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 75c9a22..63b2ff5 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +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. + 2017-12-19 Paolo Carlini <paolo.carlini@oracle.com> * gimplify.c (gimplify_expr): Use error_operand_p. diff --git a/gcc/loop-unroll.c b/gcc/loop-unroll.c index cc154da..b9d01ff 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; |