On 2014-06-16, 11:05 AM, Ramana Radhakrishnan wrote:
Hi,

     This handles NULL targetm.spill_class in assign_by_spills. This
showed up as a segfault during a build for arm-none-linux-gnueabi(hf).

Fix pre-approved by richi on IRC , verified that bootstrap continues
from where things broke further on a tree (that reverts 211600 which is
the next breakage causing commit on arm-none-linux-gnueabihf)

I'll apply this in about 45 minutes when I get back to my desk if no one
objects.



Ops, I've already committed the following patch (sorry I've not read email before doing this):

I apologize for my mistake with the original patch.

2014-06-16  Vladimir Makarov  <vmaka...@redhat.com>

        PR rtl-optimization/61522
        * lra-assigns.c (assign_by_spills): Check null
        targetm.spill_class.

Index: lra-assigns.c
===================================================================
--- lra-assigns.c       (revision 211710)
+++ lra-assigns.c       (working copy)
@@ -1425,7 +1425,8 @@
              enum reg_class rclass = lra_get_allocno_class (regno);
              enum reg_class spill_class;

-             if (lra_reg_info[regno].restore_regno < 0
+             if (targetm.spill_class == NULL
+                 || lra_reg_info[regno].restore_regno < 0
                  || ! bitmap_bit_p (&lra_inheritance_pseudos, regno)
                  || (spill_class
                      = ((enum reg_class)

Reply via email to