Commit 1f069ef5 by Kyrylo Tkachov Committed by Kyrylo Tkachov

[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
parent fcd1b8df
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
......@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment