aboutsummaryrefslogtreecommitdiff
path: root/gcc/unroll.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/unroll.c')
-rw-r--r--gcc/unroll.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/gcc/unroll.c b/gcc/unroll.c
index 7e584c961d0..d6dbcf0fbc1 100644
--- a/gcc/unroll.c
+++ b/gcc/unroll.c
@@ -1262,7 +1262,18 @@ unroll_loop (loop_end, insn_count, loop_start, end_insert_before,
insn = NEXT_INSN (copy_start);
while (insn != safety_label)
{
- if (insn != start_label)
+ /* ??? Don't delete named code labels. They will be deleted when the
+ jump that references them is deleted. Otherwise, we end up deleting
+ them twice, which causes them to completely disappear instead of turn
+ into NOTE_INSN_DELETED_LABEL notes. This in turn causes aborts in
+ dwarfout.c/dwarf2out.c. We could perhaps fix the dwarf*out.c files
+ to handle deleted labels instead. Or perhaps fix DECL_RTL of the
+ associated LABEL_DECL to point to one of the new label instances. */
+ /* ??? Likewise, we can't delete a NOTE_INSN_DELETED_LABEL note. */
+ if (insn != start_label
+ && ! (GET_CODE (insn) == CODE_LABEL && LABEL_NAME (insn))
+ && ! (GET_CODE (insn) == NOTE
+ && NOTE_LINE_NUMBER (insn) == NOTE_INSN_DELETED_LABEL))
insn = delete_insn (insn);
else
insn = NEXT_INSN (insn);