print-rtl.c (print_rtx): Only print note line number as string if between NOTE_INSN_B...
authorJakub Jelinek <jakub@redhat.com>
Thu, 18 May 2000 19:26:57 +0000 (21:26 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Thu, 18 May 2000 19:26:57 +0000 (21:26 +0200)
* print-rtl.c (print_rtx): Only print note line number as string
if between NOTE_INSN_BIAS and NOTE_INSN_MAX.
* final.c (final_scan_insn): Do nothing for note line number 0.

From-SVN: r33997

gcc/ChangeLog
gcc/final.c
gcc/print-rtl.c

index 81ffafbc43defbb8a9067ac3041db6e18aa71ca6..b9a786c5157c8b30ead1d0ac30c737ef55d89409 100644 (file)
@@ -1,3 +1,9 @@
+2000-05-18  Jakub Jelinek  <jakub@redhat.com>
+
+       * print-rtl.c (print_rtx): Only print note line number as string
+       if between NOTE_INSN_BIAS and NOTE_INSN_MAX.
+       * final.c (final_scan_insn): Do nothing for note line number 0.
+
 2000-05-18  Jakub Jelinek  <jakub@redhat.com>
 
        * gcc-common.c (ggc_mark_rtx_children): Mark NOTE_EXPECTED_VALUE
index 02dc418a35fb8a2dc364e19ff844af8a50f2a55d..2145f99b70877aafa1ca1737f61f9e13fe8954ce 100644 (file)
@@ -2261,6 +2261,9 @@ final_scan_insn (insn, file, optimize, prescan, nopeepholes)
            }
          break;
 
+       case 0:
+         break;
+
        default:
          if (NOTE_LINE_NUMBER (insn) <= 0)
            abort ();
index d8008380215d6f57d1d383edadedad808e89ba2f..5cea980123b29cba9d842b19ae6372c43698f6ce 100644 (file)
@@ -328,7 +328,8 @@ print_rtx (in_rtx)
       /* Print NOTE_INSN names rather than integer codes.  */
 
       case 'n':
-       if (XINT (in_rtx, i) <= 0)
+       if (XINT (in_rtx, i) >= NOTE_INSN_BIAS
+           && XINT (in_rtx, i) < NOTE_INSN_MAX)
          fprintf (outfile, " %s", GET_NOTE_INSN_NAME (XINT (in_rtx, i)));
        else
          fprintf (outfile, " %d", XINT (in_rtx, i));