Hi!

While debugging PR52172, I've noticed ICE when dumping RTL, all of
cselib seems to test setting_insn for NULL, but this spot doesn't.

Ok for trunk?

2012-02-13  Jakub Jelinek  <ja...@redhat.com>

        * cselib.c (dump_cselib_val): Don't assume l->setting_insn is
        non-NULL.

--- gcc/cselib.c.jj     2012-01-26 09:22:21.000000000 +0100
+++ gcc/cselib.c        2012-02-13 11:07:15.109023769 +0100
@@ -2688,8 +2688,11 @@ dump_cselib_val (void **x, void *info)
       fputs (" locs:", out);
       do
        {
-         fprintf (out, "\n  from insn %i ",
-                  INSN_UID (l->setting_insn));
+         if (l->setting_insn)
+           fprintf (out, "\n  from insn %i ",
+                    INSN_UID (l->setting_insn));
+         else
+           fprintf (out, "\n   ");
          print_inline_rtx (out, l->loc, 4);
        }
       while ((l = l->next));

        Jakub

Reply via email to