re PR rtl-optimization/49154 (build fails on cris-elf in libgcc: ICE in setup_pressur...
authorHans-Peter Nilsson <hp@axis.com>
Thu, 9 Jun 2011 23:38:35 +0000 (23:38 +0000)
committerHans-Peter Nilsson <hp@gcc.gnu.org>
Thu, 9 Jun 2011 23:38:35 +0000 (23:38 +0000)
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

gcc/ChangeLog
gcc/ira-costs.c

index f05ecfd73e8e4f79b5cca1d9ddc3cf3b50a360c5..cd42b1afa33c97147832c5ab1b65132fff66473b 100644 (file)
@@ -1,5 +1,10 @@
 2011-06-10  Hans-Peter Nilsson  <hp@axis.com>
 
+       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.
index f517386ceef0c2525cecb0cbaa22869ddd1ac725..a22bb1571cc69946e359e84d67cfcac2bd3c2f70 100644 (file)
@@ -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;