lcm.c (optimize_mode_switching): Check whether an insn is a NOTE before taking its NOTE_LINE_NUMBER.

* lcm.c (optimize_mode_switching): Check whether an insn is a NOTE
before taking its NOTE_LINE_NUMBER.

From-SVN: r38140
This commit is contained in:
Alexandre Oliva 2000-12-08 22:28:57 +00:00 committed by Alexandre Oliva
parent 583e347f78
commit 25fa8bdca2
2 changed files with 8 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2000-12-08 Alexandre Oliva <aoliva@redhat.com>
* lcm.c (optimize_mode_switching): Check whether an insn is a NOTE
before taking its NOTE_LINE_NUMBER.
2000-12-08 Nick Clifton <nickc@redhat.com>
* config/arm/arm.md (load_indirect_jump): Add pool ranges.

View File

@ -1269,7 +1269,9 @@ optimize_mode_switching (file)
mode_set = gen_sequence ();
end_sequence ();
if (NOTE_LINE_NUMBER (ptr->insn_ptr) == NOTE_INSN_BASIC_BLOCK)
if (GET_CODE (ptr->insn_ptr) == NOTE
&& (NOTE_LINE_NUMBER (ptr->insn_ptr)
== NOTE_INSN_BASIC_BLOCK))
emit_block_insn_after (mode_set, ptr->insn_ptr,
BASIC_BLOCK (ptr->bbnum));
else