summaryrefslogtreecommitdiff
path: root/gcc/emit-rtl.c
diff options
context:
space:
mode:
authorjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>2000-03-04 09:32:35 +0000
committerjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>2000-03-04 09:32:35 +0000
commite33dbbdf5bab6846f0940ff4642f7591a808d2a1 (patch)
tree7dbe32baf99950bdd8c71c770cc96d2bfec358e9 /gcc/emit-rtl.c
parent1a02038c5601046dafc51f09a37349a5c3a39007 (diff)
downloadgcc-e33dbbdf5bab6846f0940ff4642f7591a808d2a1.tar.gz
* 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@32324 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/emit-rtl.c')
-rw-r--r--gcc/emit-rtl.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/gcc/emit-rtl.c b/gcc/emit-rtl.c
index f43a1814d1d..27b837447f0 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)