From: Hans-Peter Nilsson Date: Thu, 9 Jun 2011 23:38:35 +0000 (+0000) Subject: re PR rtl-optimization/49154 (build fails on cris-elf in libgcc: ICE in setup_pressur... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c577822ec18dbe068fe0a3d974e64a5afc52f00d;p=gcc.git re PR rtl-optimization/49154 (build fails on cris-elf in libgcc: ICE in setup_pressure_classes, at ira.c:902) PR rtl-optimization/49154 * ira-costs.c (setup_regno_cost_classes_by_mode): If there already is a matching slot in the hashtable, assign it to classes_ptr. From-SVN: r174868 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index f05ecfd73e8..cd42b1afa33 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,10 @@ 2011-06-10 Hans-Peter Nilsson + PR rtl-optimization/49154 + * ira-costs.c (setup_regno_cost_classes_by_mode): If there + already is a matching slot in the hashtable, assign it to + classes_ptr. + PR rtl-optimization/49154 * doc/tm.texi.in (Register Classes): Document rule for the narrowest register classes. diff --git a/gcc/ira-costs.c b/gcc/ira-costs.c index f517386ceef..a22bb1571cc 100644 --- a/gcc/ira-costs.c +++ b/gcc/ira-costs.c @@ -299,6 +299,8 @@ setup_regno_cost_classes_by_mode (int regno, enum machine_mode mode) classes_ptr = setup_cost_classes (&classes); *slot = classes_ptr; } + else + classes_ptr = *slot; cost_classes_mode_cache[mode] = (cost_classes_t) *slot; } regno_cost_classes[regno] = classes_ptr;