diff options
author | Jason Merrill <jason@casey.cygnus.com> | 2000-03-04 09:32:35 +0000 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 2000-03-04 04:32:35 -0500 |
commit | deb5e2801f7c307c0c0d225fd244741c7635deeb (patch) | |
tree | 7dbe32baf99950bdd8c71c770cc96d2bfec358e9 /gcc/emit-rtl.c | |
parent | e8965a187162a2da95e059a6ef3d16a68258d046 (diff) | |
download | gcc-deb5e2801f7c307c0c0d225fd244741c7635deeb.zip gcc-deb5e2801f7c307c0c0d225fd244741c7635deeb.tar.gz gcc-deb5e2801f7c307c0c0d225fd244741c7635deeb.tar.bz2 |
stmt.c (is_body_block): Move...
* stmt.c (is_body_block): Move...
* dwarfout.c, dwarf2out.c: ...from here.
* tree.h: Declare it.
* emit-rtl.c (remove_unncessary_notes): Don't remove the body block.
* final.c (final_start_function): Do call remove_unnecessary_notes
when scheduling.
From-SVN: r32324
Diffstat (limited to 'gcc/emit-rtl.c')
-rw-r--r-- | gcc/emit-rtl.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/gcc/emit-rtl.c b/gcc/emit-rtl.c index f43a181..27b8374 100644 --- a/gcc/emit-rtl.c +++ b/gcc/emit-rtl.c @@ -2711,10 +2711,16 @@ remove_unncessary_notes () if (NOTE_BLOCK (prev) != NOTE_BLOCK (insn)) abort (); - debug_ignore_block (NOTE_BLOCK (insn)); - - remove_insn (prev); - remove_insn (insn); + /* Never delete the BLOCK for the outermost scope + of the function; we can refer to names from + that scope even if the block notes are messed up. */ + if (! is_body_block (NOTE_BLOCK (insn))) + { + debug_ignore_block (NOTE_BLOCK (insn)); + + remove_insn (prev); + remove_insn (insn); + } break; } else if (NOTE_LINE_NUMBER (prev) == NOTE_INSN_BLOCK_END) |