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-Tag: basepoints/gcc-9~2572 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f389e7983bc89fb3d6041d676de7e313892d5ede;p=thirdparty%2Fgcc.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 75c9a222f9f7..63b2ff5406fd 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 cc154da9686a..b9d01ffe0664 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;