The following patch fixes http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55396
The patch was successfully tested and bootstrapped on x886/x86-64. Committed as rev. 193678. 2012-11-20 Vladimir Makarov <vmaka...@redhat.com> PR rtl-optimization/55396 * lra-constraints.c (get_reload_reg): Change class if it is different from reg class.
Index: lra-constraints.c =================================================================== --- lra-constraints.c (revision 193677) +++ lra-constraints.c (working copy) @@ -425,7 +425,7 @@ get_reload_reg (enum op_type type, enum fprintf (lra_dump_file, " Reuse r%d for reload ", regno); print_value_slim (lra_dump_file, original, 1); } - if (rclass != new_class) + if (new_class != lra_get_allocno_class (regno)) change_class (regno, new_class, ", change", false); if (lra_dump_file != NULL) fprintf (lra_dump_file, "\n");