This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[patch] Handle NULL in slim RTL dumps of patterns


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.

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:


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]