This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Fix typo in ira-color.c:assign_hard_reg
- From: Eric Botcazou <ebotcazou at adacore dot com>
- To: gcc-patches at gcc dot gnu dot org
- Cc: Iain Sandoe <developer at sandoe-acoustics dot co dot uk>
- Date: Sat, 1 Oct 2011 21:39:55 +0200
- Subject: Fix typo in ira-color.c:assign_hard_reg
Iain spotted a strange allocation pattern for an ACATS test on PowerPC/Darwin,
which turned out to be caused by this typo.
Tested on i586-suse-linux, applied on the mainline.
2011-10-01 Eric Botcazou <ebotcazou@adacore.com>
* ira-color.c (assign_hard_reg): Fix typo.
--
Eric Botcazou
Index: gcc/ira-color.c
===================================================================
--- gcc/ira-color.c (revision 179413)
+++ gcc/ira-color.c (working copy)
@@ -1769,7 +1769,7 @@ assign_hard_reg (ira_allocno_t a, bool r
if (best_hard_regno >= 0)
{
for (i = hard_regno_nregs[best_hard_regno][mode] - 1; i >= 0; i--)
- allocated_hardreg_p[best_hard_regno + 1] = true;
+ allocated_hardreg_p[best_hard_regno + i] = true;
}
ALLOCNO_HARD_REGNO (a) = best_hard_regno;
ALLOCNO_ASSIGNED_P (a) = true;