Patchwork Handle NULL in slim RTL dumps of patterns

login
register
mail settings
Submitter Steven Bosscher
Date Oct. 30, 2012, 9:01 p.m.
Message ID <CABu31nPJszYrgm7cd5rXdGJP_2ApyS2cwVFn6+WPShxdo0PCWg@mail.gmail.com>
Download mbox | patch
Permalink /patch/195624/
State New
Headers show

Comments

Steven Bosscher - Oct. 30, 2012, 9:01 p.m.
Hello,

NULL patterns happen in some REG_NOTEs.
Will commit as obvious in a bit...

Ciao!
Steven



        * sched-vis.c (print_pattern): Handle NULL patterns.

Patch

Index: gcc/sched-vis.c
===================================================================
--- gcc/sched-vis.c     (revision 192992)
+++ gcc/sched-vis.c     (working copy)
@@ -568,6 +568,11 @@  print_pattern (char *buf, const_rtx x, int verbose
 {
   char t1[BUF_LEN], t2[BUF_LEN], t3[BUF_LEN];

+  if (! x)
+    {
+      sprintf (buf, "(nil)");
+      return;
+    }
   switch (GET_CODE (x))
     {
     case SET: