This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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;

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]