re PR middle-end/32897 (Invalid rematerialisation of subregs)
commitc07fdd94f46a274c04563cf69c62e87d1727936d
authorRichard Sandiford <richard@codesourcery.com>
Thu, 16 Aug 2007 10:16:15 +0000 (16 10:16 +0000)
committerRichard Sandiford <rsandifo@gcc.gnu.org>
Thu, 16 Aug 2007 10:16:15 +0000 (16 10:16 +0000)
tree24148aafcfc6b92104799dde10993008c3662278
parent684939cef5c8dee565d3711b720c45c5b6596b8a
re PR middle-end/32897 (Invalid rematerialisation of subregs)

gcc/
PR middle-end/32897
* reload.c (find_reloads): Check that the memory returned by
find_reloads_toplev was not the result of forcing a constant
to memory.
(find_reloads_toplev): Always use simplify_gen_subreg to get
the subreg of a constant.  If the result is also a constant,
but not a legitimate one, force it into the constant pool
and reload its address.

gcc/testsuite/
* gcc.dg/torture/pr32897.c: New test.

From-SVN: r127536
gcc/ChangeLog
gcc/reload.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/torture/pr32897.c [new file with mode: 0644]