This is the mail archive of the gcc-bugs@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]

[Bug bootstrap/44921] [4.6 Regression] Failed to bootstrap



------- Comment #1 from hjl dot tools at gmail dot com  2010-07-12 18:46 -------
This patch:

Index: postreload.c
===================================================================
--- postreload.c        (revision 162085)
+++ postreload.c        (working copy)
@@ -1281,7 +1281,7 @@ move2add_use_add3_insn (rtx reg, rtx sym
   rtx src = SET_SRC (pat);
   int regno = REGNO (reg);
   int min_cost = INT_MAX;
-  int min_regno;
+  int min_regno = -1;
   bool speed = optimize_bb_for_speed_p (BLOCK_FOR_INSN (insn));
   int i;

@@ -1317,7 +1317,7 @@ move2add_use_add3_insn (rtx reg, rtx sym
          }
       }

-  if (min_cost < rtx_cost (src, SET, speed))
+  if (min_regno >= 0 && min_cost < rtx_cost (src, SET, speed))
     {
       rtx tem;

works for me.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44921


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