* final.c (final_scan_insn): Abort if block_depth falls below 0.
authorRichard Henderson <rth@cygnus.com>
Tue, 1 Dec 1998 11:56:06 +0000 (03:56 -0800)
committerRichard Henderson <rth@gcc.gnu.org>
Tue, 1 Dec 1998 11:56:06 +0000 (03:56 -0800)
From-SVN: r24030

gcc/ChangeLog
gcc/final.c

index 1eb7c84d0589646c01122187151ff590734bc3d7..ac20dac0188a8763b4e8063f4d312d430908c777 100644 (file)
@@ -1,3 +1,7 @@
+Tue Dec  1 11:55:04 1998  Richard Henderson  <rth@cygnus.com>
+
+       * final.c (final_scan_insn): Abort if block_depth falls below 0.
+
 Tue Dec  1 10:23:16 1998  Nick Clifton  <nickc@cygnus.com>
 
        * config/arm/t-arm-elf (LIBGCC2_CFLAGS): Define inhibit_libc.
index be6f3312f7f185444edb682930c102ad6b8f69c1..5bcfd6bd4caaa6aa18d254b4aea41dd3a22433f0 100644 (file)
@@ -2184,28 +2184,30 @@ final_scan_insn (insn, file, optimize, prescan, nopeepholes)
             PENDING_BLOCKS and output debugging info based on that.  */
 
          --block_depth;
+         if (block_depth < 0)
+           abort ();
 
 #ifdef XCOFF_DEBUGGING_INFO
-         if (write_symbols == XCOFF_DEBUG && block_depth >= 0)
+         if (write_symbols == XCOFF_DEBUG)
            xcoffout_end_block (file, high_block_linenum,
                                pending_blocks[block_depth]);
 #endif
 #ifdef DBX_DEBUGGING_INFO
-         if (write_symbols == DBX_DEBUG && block_depth >= 0)
+         if (write_symbols == DBX_DEBUG)
            ASM_OUTPUT_INTERNAL_LABEL (file, "LBE",
                                       pending_blocks[block_depth]);
 #endif
 #ifdef SDB_DEBUGGING_INFO
-         if (write_symbols == SDB_DEBUG && block_depth >= 0)
+         if (write_symbols == SDB_DEBUG)
            sdbout_end_block (file, high_block_linenum,
                              pending_blocks[block_depth]);
 #endif
 #ifdef DWARF_DEBUGGING_INFO
-         if (write_symbols == DWARF_DEBUG && block_depth >= 0)
+         if (write_symbols == DWARF_DEBUG)
            dwarfout_end_block (pending_blocks[block_depth]);
 #endif
 #ifdef DWARF2_DEBUGGING_INFO
-         if (write_symbols == DWARF2_DEBUG && block_depth >= 0)
+         if (write_symbols == DWARF2_DEBUG)
            dwarf2out_end_block (pending_blocks[block_depth]);
 #endif
        }