Commit f87b4b2f by Jakub Jelinek Committed by Jakub Jelinek

re PR tree-optimization/84946 (UBSAN: in mem_valid_for_store_merging…

re PR tree-optimization/84946 (UBSAN: in mem_valid_for_store_merging ../../gcc/gimple-ssa-store-merging.c:3951)

	PR tree-optimization/84946
	* gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
	bitsize + bitsize in poly_uint64 rather than poly_int64.

From-SVN: r258665
parent 90841d43
2018-03-19 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/84946
* gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
bitsize + bitsize in poly_uint64 rather than poly_int64.
PR sanitizer/78651
* dwarf2asm.c: Include fold-const.c.
(dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
......
......@@ -3948,7 +3948,8 @@ mem_valid_for_store_merging (tree mem, poly_uint64 *pbitsize,
if (known_eq (bitregion_end, 0U))
{
bitregion_start = round_down_to_byte_boundary (bitpos);
bitregion_end = round_up_to_byte_boundary (bitpos + bitsize);
bitregion_end = bitpos;
bitregion_end = round_up_to_byte_boundary (bitregion_end + bitsize);
}
if (offset != NULL_TREE)
......
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