]> git.ipfire.org Git - thirdparty/gcc.git/commit
Fix handling of unknown sizes in rtx_addr_can_trap_p
authorrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 16 Nov 2016 10:20:23 +0000 (10:20 +0000)
committerrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 16 Nov 2016 10:20:23 +0000 (10:20 +0000)
commite9d7df9e7c8a8190fa8a34e628978be89e777b6a
tree528d4bf22f77e46d7341098e854448239ab851b1
parent8c057503467e9a69595ccf1f26c3f88275caa8c1
Fix handling of unknown sizes in rtx_addr_can_trap_p

If the size passed in to rtx_addr_can_trap_p was zero, the frame
handling would get the size from the mode instead.  However, this
too can be zero if the mode is BLKmode, i.e. if we have a BLKmode
memory reference with no MEM_SIZE (which should be rare these days).
This meant that the conditions for a 4-byte access at offset X were
stricter than those for an access of unknown size at offset X.

This patch checks whether the size is still zero, as the
SYMBOL_REF handling does.

gcc/
2016-11-15  Richard Sandiford  <richard.sandiford@arm.com>
    Alan Hayward  <alan.hayward@arm.com>
    David Sherwood  <david.sherwood@arm.com>

* rtlanal.c (rtx_addr_can_trap_p_1): Handle unknown sizes.

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