From 0d240b273c856909b45eb04953824583f8acc8a1 Mon Sep 17 00:00:00 2001 From: rth Date: Tue, 1 Dec 1998 11:56:06 +0000 Subject: [PATCH] * final.c (final_scan_insn): Abort if block_depth falls below 0. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@24030 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 4 ++++ gcc/final.c | 12 +++++++----- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 1eb7c84..ac20dac 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +Tue Dec 1 11:55:04 1998 Richard Henderson + + * final.c (final_scan_insn): Abort if block_depth falls below 0. + Tue Dec 1 10:23:16 1998 Nick Clifton * config/arm/t-arm-elf (LIBGCC2_CFLAGS): Define inhibit_libc. diff --git a/gcc/final.c b/gcc/final.c index be6f331..5bcfd6b 100644 --- a/gcc/final.c +++ b/gcc/final.c @@ -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 } -- 2.7.4