The following patch solves PR39522. The details of the problem can be
found on
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39522
This patch actually a small corrections of my patch for PR37514. It
should behave the same way as the previous patch in all situations
when gcc with the previous patch is not aborting on gcc_assert. So I
believe the patch is safe.
Successfully bootstrapped and tested on x86_64 and ia64 (a target with
heavy usages of INC/DEC addressing).
Ok to commit?
2009-03-25 Vladimir Makarov <vmakarov@redhat.com>
PR rtl-optimization/39522
* reload1.c (reload_as_needed): Invalidate reg_last_reload_reg too
when reg_reloaded_valid is set.