This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[patch] Handle NULL in slim RTL dumps of patterns
- From: Steven Bosscher <stevenb dot gcc at gmail dot com>
- To: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 30 Oct 2012 22:01:28 +0100
- Subject: [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: