summaryrefslogtreecommitdiff
path: root/gcc/haifa-sched.c
diff options
context:
space:
mode:
authormkuvyrkov <mkuvyrkov@138bc75d-0d04-0410-961f-82ee72b054a4>2006-06-13 08:50:53 +0000
committermkuvyrkov <mkuvyrkov@138bc75d-0d04-0410-961f-82ee72b054a4>2006-06-13 08:50:53 +0000
commitec469632f7417286c3cd183f9d84dee8d9469baa (patch)
tree43ad4575682a725e8cae5a064cbc6a8e36e443af /gcc/haifa-sched.c
parent013896bf73a5f485d1d5eb03d438131657a457cb (diff)
downloadgcc-ec469632f7417286c3cd183f9d84dee8d9469baa.tar.gz
2006-06-13 Maxim Kuvyrkov <mkuvyrkov@ispras.ru>
* haifa-sched.c (unlink_other_notes, unlink_line_notes): Fix the patch for PR target/27863. 2006-06-13 Maxim Kuvyrkov <mkuvyrkov@ispras.ru> * gcc.c-torture/compile/20060609-1.c: New test. PR target/27863 * gcc.c-torture/compile/pr27863.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@114604 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/haifa-sched.c')
-rw-r--r--gcc/haifa-sched.c32
1 files changed, 19 insertions, 13 deletions
diff --git a/gcc/haifa-sched.c b/gcc/haifa-sched.c
index 8bd65c276da..70c13b1133a 100644
--- a/gcc/haifa-sched.c
+++ b/gcc/haifa-sched.c
@@ -1251,13 +1251,16 @@ unlink_other_notes (rtx insn, rtx tail)
if (next)
PREV_INSN (next) = prev;
- /* Basic block can begin with either LABEL or
- NOTE_INSN_BASIC_BLOCK. */
- gcc_assert (BB_HEAD (bb) != insn);
+ if (bb)
+ {
+ /* Basic block can begin with either LABEL or
+ NOTE_INSN_BASIC_BLOCK. */
+ gcc_assert (BB_HEAD (bb) != insn);
- /* Check if we are removing last insn in the BB. */
- if (BB_END (bb) == insn)
- BB_END (bb) = prev;
+ /* Check if we are removing last insn in the BB. */
+ if (BB_END (bb) == insn)
+ BB_END (bb) = prev;
+ }
/* See sched_analyze to see how these are handled. */
if (NOTE_LINE_NUMBER (insn) != NOTE_INSN_EH_REGION_BEG
@@ -1283,7 +1286,7 @@ unlink_line_notes (rtx insn, rtx tail)
{
rtx prev = PREV_INSN (insn);
- while (insn != tail && NOTE_P (insn))
+ while (insn != tail && NOTE_NOT_BB_P (insn))
{
rtx next = NEXT_INSN (insn);
@@ -1297,13 +1300,16 @@ unlink_line_notes (rtx insn, rtx tail)
if (next)
PREV_INSN (next) = prev;
- /* Basic block can begin with either LABEL or
- NOTE_INSN_BASIC_BLOCK. */
- gcc_assert (BB_HEAD (bb) != insn);
+ if (bb)
+ {
+ /* Basic block can begin with either LABEL or
+ NOTE_INSN_BASIC_BLOCK. */
+ gcc_assert (BB_HEAD (bb) != insn);
- /* Check if we are removing last insn in the BB. */
- if (BB_END (bb) == insn)
- BB_END (bb) = prev;
+ /* Check if we are removing last insn in the BB. */
+ if (BB_END (bb) == insn)
+ BB_END (bb) = prev;
+ }
/* Record line-number notes so they can be reused. */
LINE_NOTE (insn) = insn;