From patchwork Mon Apr 11 19:23:39 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: patch PR48464 Date: Mon, 11 Apr 2011 09:23:39 -0000 From: Vladimir Makarov X-Patchwork-Id: 90635 Message-Id: <4DA3553B.2020807@redhat.com> To: gcc-patches The following patch fixes PR48464. The description of the problem can be found on http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48464 Committed as obvious after successful bootstrap on x86-64. 2011-04-11 Vladimir Makarov PR middle-end/48464 * ira.c (setup_pressure_classes): Fix typo in loop condition. (setup_allocno_and_important_classes): Ditto. Index: ira.c =================================================================== --- ira.c (revision 172273) +++ ira.c (working copy) @@ -863,7 +863,7 @@ setup_pressure_classes (void) registers available for the allocation. */ CLEAR_HARD_REG_SET (temp_hard_regset); CLEAR_HARD_REG_SET (temp_hard_regset2); - for (cl = 0; cl <= LIM_REG_CLASSES; cl++) + for (cl = 0; cl < LIM_REG_CLASSES; cl++) { for (i = 0; i < n; i++) if ((int) pressure_classes[i] == cl) @@ -923,7 +923,7 @@ setup_allocno_and_important_classes (voi /* Collect classes which contain unique sets of allocatable hard registers. Prefer GENERAL_REGS to other classes containing the same set of hard registers. */ - for (i = 0; i <= LIM_REG_CLASSES; i++) + for (i = 0; i < LIM_REG_CLASSES; i++) { COPY_HARD_REG_SET (temp_hard_regset, reg_class_contents[i]); AND_COMPL_HARD_REG_SET (temp_hard_regset, no_unit_alloc_regs);