From 0c4992b02aec3b5f25114e7352342df9fafe7cf5 Mon Sep 17 00:00:00 2001 From: Jan Hubicka Date: Sun, 2 Sep 2001 18:38:46 +0200 Subject: [PATCH] * reload1.c (fixup_abnormal_edges): Allow NOTEs in the sequence. From-SVN: r45358 --- gcc/ChangeLog | 4 ++++ gcc/reload1.c | 11 +++++++---- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 260f09facad..6fb448bb723 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +Sun Sep 2 18:37:54 CEST 2001 Jan Hubicka + + * reload1.c (fixup_abnormal_edges): Allow NOTEs in the sequence. + 2001-09-01 Geoffrey Keating * expr.c (push_block): Make sane use of STACK_GROWS_DOWNWARD. diff --git a/gcc/reload1.c b/gcc/reload1.c index bf66c00c51c..c4059810b04 100644 --- a/gcc/reload1.c +++ b/gcc/reload1.c @@ -9497,7 +9497,7 @@ fixup_abnormal_edges () } if (e && GET_CODE (bb->end) != CALL_INSN && !can_throw_internal (bb->end)) { - rtx insn = bb->end; + rtx insn = bb->end, stop = NEXT_INSN (bb->end); rtx next; for (e = bb->succ; e; e = e->succ_next) if (e->flags & EDGE_FALLTHRU) @@ -9513,11 +9513,14 @@ fixup_abnormal_edges () bb->end = insn; inserted = true; insn = NEXT_INSN (insn); - while (insn && GET_CODE (insn) == INSN) + while (insn && insn != stop) { next = NEXT_INSN (insn); - insert_insn_on_edge (PATTERN (insn), e); - flow_delete_insn (insn); + if (INSN_P (insn)) + { + insert_insn_on_edge (PATTERN (insn), e); + flow_delete_insn (insn); + } insn = next; } }