Fix HWI + -unsigned in combine.c
commit30a86effd19f766507bcf82a70ce07f75513100c
authorrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 23 Oct 2017 06:07:26 +0000 (23 06:07 +0000)
committerrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 23 Oct 2017 06:07:26 +0000 (23 06:07 +0000)
tree4f86a2e953095b545d73efdd1a8123a03a35c9ab
parentee3a0978a5b76a0c303dc85259afd951c559f6d8
Fix HWI + -unsigned in combine.c

rtx_equal_for_field_assignment_p had:

  x = adjust_address_nv (x, GET_MODE (y),
       -subreg_lowpart_offset (GET_MODE (x),
       GET_MODE (y)));

But subreg_lowpart_offset returns an unsigned int and
adjust_address_nv takes a HWI, so a subreg offset of 4 would
give a memory offset of 0x00000000fffffffffc.

2017-10-23  Richard Sandiford  <richard.sandiford@linaro.org>

gcc/
* combine.c (rtx_equal_for_field_assignment_p): Use
byte_lowpart_offset.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@253997 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/combine.c