Patchwork unbreak iq2000 build a bit

login
register
mail settings
Submitter Nick Clifton
Date Oct. 17, 2012, 9:21 a.m.
Message ID <507E7897.1030806@redhat.com>
Download mbox | patch
Permalink /patch/191992/
State New
Headers show

Comments

Nick Clifton - Oct. 17, 2012, 9:21 a.m.
Hi Steven,

> iq2000 build is broken since at least r162089 (July 2010). I'm going
> to commit this patch to fix this part of the build problem.

Thanks.

> It still
> fails later one, but I don't care about that

FYI I have this patch installed in my local sources that allows the 
iq2000 port to build successfully.  I have not submitted it upstream yet 
because I am not sure if it is the correct fix for the problem.

Cheers
   Nick

Patch

Index: gcc/dwarf2out.c
===================================================================
--- gcc/dwarf2out.c     (revision 192527)
+++ gcc/dwarf2out.c     (working copy)
@@ -20092,11 +20092,13 @@ 
        ca_loc->call_arg_loc_note = loc_note;
        ca_loc->next = NULL;
        ca_loc->label = last_label;
-      gcc_assert (prev
-                 && (CALL_P (prev)
-                     || (NONJUMP_INSN_P (prev)
-                         && GET_CODE (PATTERN (prev)) == SEQUENCE
-                         && CALL_P (XVECEXP (PATTERN (prev), 0, 0)))));
+      while (prev != NULL_RTX
+            && ! CALL_P (prev)
+            && ! (NONJUMP_INSN_P (prev)
+                  && GET_CODE (PATTERN (prev)) == SEQUENCE
+                  && CALL_P (XVECEXP (PATTERN (prev), 0, 0))))
+       prev = prev_nonnote_nondebug_insn (prev);
+      gcc_assert (prev != NULL_RTX);
        if (!CALL_P (prev))
         prev = XVECEXP (PATTERN (prev), 0, 0);
        ca_loc->tail_call_p = SIBLING_CALL_P (prev);