print-rtl.c (print_rtx, case NOTE): Don't blow up if NOTE_BASIC_BLOCK not yet set.
authorRichard Kenner <kenner@vlsi1.ultra.nyu.edu>
Fri, 14 Apr 2000 22:20:38 +0000 (22:20 +0000)
committerRichard Kenner <kenner@gcc.gnu.org>
Fri, 14 Apr 2000 22:20:38 +0000 (18:20 -0400)
* print-rtl.c (print_rtx, case NOTE): Don't blow up if NOTE_BASIC_BLOCK
not yet set.

From-SVN: r33156

gcc/ChangeLog
gcc/print-rtl.c

index 6c8cfb4..60fa2cc 100644 (file)
@@ -1,5 +1,8 @@
 Fri Apr 14 18:07:30 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
 
+       * print-rtl.c (print_rtx, case NOTE): Don't blow up if NOTE_BASIC_BLOCK
+       not yet set.
+
        * expr.c (reload.h): Now included.
        (emit_block_move): Set volatile_ok when checking for movstr.
        (emit_move_1): Check for replacements in addresses in multi-word case.
index 5ffc30c..ee7e64c 100644 (file)
@@ -195,7 +195,9 @@ print_rtx (in_rtx)
            else if (NOTE_LINE_NUMBER (in_rtx) == NOTE_INSN_BASIC_BLOCK)
              {
                basic_block bb = NOTE_BASIC_BLOCK (in_rtx);
-               fprintf (outfile, " [bb %d]", bb->index);
+
+               if (bb != 0)
+                 fprintf (outfile, " [bb %d]", bb->index);
              }
            else
              {