From: Segher Boessenkool Date: Tue, 25 Nov 2014 17:52:21 +0000 (+0100) Subject: bt-load.c (migrate_btr_defs): Get the key of a heap entry before removing it, not... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=375132991d21ea039aaecd850018a636f240bebb;p=gcc.git bt-load.c (migrate_btr_defs): Get the key of a heap entry before removing it, not after. * bt-load.c (migrate_btr_defs): Get the key of a heap entry before removing it, not after. From-SVN: r218056 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index add2e7021e8..cd9d808fb0d 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2014-11-25 Segher Boessenkool + + * bt-load.c (migrate_btr_defs): Get the key of a heap entry + before removing it, not after. + 2014-11-25 Segher Boessenkool * config/mn10300/mn10300.c (mn10300_insert_setlb_lcc): Remove diff --git a/gcc/bt-load.c b/gcc/bt-load.c index 3002b62e8e1..53c4db31847 100644 --- a/gcc/bt-load.c +++ b/gcc/bt-load.c @@ -1434,8 +1434,8 @@ migrate_btr_defs (enum reg_class btr_class, int allow_callee_save) while (!all_btr_defs.empty ()) { - btr_def def = all_btr_defs.extract_min (); int min_cost = -all_btr_defs.min_key (); + btr_def def = all_btr_defs.extract_min (); if (migrate_btr_def (def, min_cost)) { all_btr_defs.insert (-def->cost, def);