From 99b96649c17e6a2f9b5e1427603d164ad752c15b Mon Sep 17 00:00:00 2001 From: Eric Botcazou Date: Mon, 8 Sep 2008 21:21:10 +0000 Subject: [PATCH] ira-color.c (ira_reuse_stack_slot): Set slot_num on success at the end of the search. * ira-color.c (ira_reuse_stack_slot): Set slot_num on success at the end of the search. From-SVN: r140121 --- gcc/ChangeLog | 5 +++++ gcc/ira-color.c | 5 +++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index abf03fd..2242afc 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2008-09-08 Eric Botcazou + + * ira-color.c (ira_reuse_stack_slot): Set slot_num on success at the + end of the search. + 2008-09-08 M R Swami Reddy * crx/crx.h (IRA_COVER_CLASSES): Define. diff --git a/gcc/ira-color.c b/gcc/ira-color.c index 833048e..a161c08 100644 --- a/gcc/ira-color.c +++ b/gcc/ira-color.c @@ -2728,10 +2728,11 @@ ira_reuse_stack_slot (int regno, unsigned int inherent_size, } if (best_cost >= 0) { - slot = &ira_spilled_reg_stack_slots[best_slot_num]; + slot_num = best_slot_num; + slot = &ira_spilled_reg_stack_slots[slot_num]; SET_REGNO_REG_SET (&slot->spilled_regs, regno); x = slot->mem; - ALLOCNO_HARD_REGNO (allocno) = -best_slot_num - 2; + ALLOCNO_HARD_REGNO (allocno) = -slot_num - 2; } } if (x != NULL_RTX) -- 2.7.4