aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKyrylo Tkachov <kyrylo.tkachov@arm.com>2016-11-08 12:31:31 +0000
committerKyrylo Tkachov <ktkachov@gcc.gnu.org>2016-11-08 12:31:31 +0000
commit1f069ef5a1899e119979b755c6627bb19176a4f0 (patch)
tree9e7ddb887c4f6fd1064e87cc8f1150ad26da6540
parentfcd1b8dffcaa5806e62d0203b13ad1696fec254f (diff)
downloadgcc-1f069ef5a1899e119979b755c6627bb19176a4f0.zip
gcc-1f069ef5a1899e119979b755c6627bb19176a4f0.tar.gz
gcc-1f069ef5a1899e119979b755c6627bb19176a4f0.tar.bz2
[1/2] Fix off-by-one error in clear_bit_region in store merging (PR tree-optimization/78234 ?)
PR tree-optimization/78234 * gimple-ssa-store-merging.c (clear_bit_region): Fix off-by-one error in start != 0 case. From-SVN: r241962
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/gimple-ssa-store-merging.c2
2 files changed, 7 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index f06b68e..b4169ed 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2016-11-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
+
+ PR tree-optimization/78234
+ * gimple-ssa-store-merging.c (clear_bit_region): Fix off-by-one error
+ in start != 0 case.
+
2016-11-08 Martin Liska <mliska@suse.cz>
PR testsuite/78242
diff --git a/gcc/gimple-ssa-store-merging.c b/gcc/gimple-ssa-store-merging.c
index 57b8556..727ed9f 100644
--- a/gcc/gimple-ssa-store-merging.c
+++ b/gcc/gimple-ssa-store-merging.c
@@ -337,7 +337,7 @@ clear_bit_region (unsigned char *ptr, unsigned int start,
else if (start != 0)
{
clear_bit_region (ptr, start, BITS_PER_UNIT - start);
- clear_bit_region (ptr + 1, 0, len - (BITS_PER_UNIT - start) + 1);
+ clear_bit_region (ptr + 1, 0, len - (BITS_PER_UNIT - start));
}
/* Whole bytes need to be cleared. */
else if (start == 0 && len > BITS_PER_UNIT)