[RELOAD] Don't assume subreg mem address is ok
commit66592e95db41216e6fb1d76a831f8efa6bcf0d6f
authorAlan Modra <amodra@gmail.com>
Wed, 17 Aug 2016 22:41:22 +0000 (18 08:11 +0930)
committerAlan Modra <amodra@gcc.gnu.org>
Wed, 17 Aug 2016 22:41:22 +0000 (18 08:11 +0930)
treef81e4c1cdce3465669f486e5c83c18bd770bc7ee
parent6fbf26cc575cd5d50acc63a0d935744399230435
[RELOAD] Don't assume subreg mem address is ok

This patch fixes a case where reload blindly assumes a subreg mem is
OK if its address has been partially reloaded by legitimize_reload_address.

PR rtl-optimization/72771
* reload.c (find_reloads): Don't assume that a subreg mem is OK
when find_reloads_toplev returns address_reloaded==-1.
(alternative_allows_const_pool_ref): Update comment.
testsuite/
* gcc.c-torture/compile/pr72771.c: New.

From-SVN: r239549
gcc/ChangeLog
gcc/reload.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.c-torture/compile/pr72771.c [new file with mode: 0644]