From: Martin Liska Date: Tue, 19 Dec 2017 13:20:07 +0000 (+0100) Subject: Fix off by one error in loop-unroll.c (PR rtl-optimization/82675). X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f389e7983bc89fb3d6041d676de7e313892d5ede;p=gcc.git Fix off by one error in loop-unroll.c (PR rtl-optimization/82675). 2017-12-19 Martin Liska PR rtl-optimization/82675 * loop-unroll.c (unroll_loop_constant_iterations): Allocate one more element in sbitmap. From-SVN: r255818 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 75c9a222f9f..63b2ff5406f 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2017-12-19 Martin Liska + + PR rtl-optimization/82675 + * loop-unroll.c (unroll_loop_constant_iterations): Allocate one + more element in sbitmap. + 2017-12-19 Paolo Carlini * gimplify.c (gimplify_expr): Use error_operand_p. 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 remove_edges;