diff options
author | Maxim Kuvyrkov <mkuvyrkov@ispras.ru> | 2006-06-08 08:51:13 +0000 |
---|---|---|
committer | Maxim Kuvyrkov <mkuvyrkov@gcc.gnu.org> | 2006-06-08 08:51:13 +0000 |
commit | f70b22c9423c0352d34ed783b92eb98645cb18f1 (patch) | |
tree | dd600eb9e487c470b97b977ffe09c4e1cdef4d4a /gcc | |
parent | 960f80d1ee2d882f29886db66a3edf4c824eeaf0 (diff) | |
download | gcc-f70b22c9423c0352d34ed783b92eb98645cb18f1.zip gcc-f70b22c9423c0352d34ed783b92eb98645cb18f1.tar.gz gcc-f70b22c9423c0352d34ed783b92eb98645cb18f1.tar.bz2 |
re PR target/27863 (ICE in check_cfg, at haifa-sched.c:4615)
2006-06-08 Maxim Kuvyrkov <mkuvyrkov@ispras.ru>
PR target/27863
* haifa-sched.c (unlink_other_notes, unlink_line_notes): Update basic
block boundaries.
From-SVN: r114484
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/haifa-sched.c | 20 |
2 files changed, 26 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 12bd419..d840d64 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2006-06-08 Maxim Kuvyrkov <mkuvyrkov@ispras.ru> + + PR target/27863 + * haifa-sched.c (unlink_other_notes, unlink_line_notes): Update basic + block boundaries. + 2006-06-08 Richard Guenther <rguenther@suse.de> PR middle-end/27116 diff --git a/gcc/haifa-sched.c b/gcc/haifa-sched.c index 9505047..8bd65c2 100644 --- a/gcc/haifa-sched.c +++ b/gcc/haifa-sched.c @@ -1243,12 +1243,22 @@ unlink_other_notes (rtx insn, rtx tail) while (insn != tail && NOTE_NOT_BB_P (insn)) { rtx next = NEXT_INSN (insn); + basic_block bb = BLOCK_FOR_INSN (insn); + /* Delete the note from its current position. */ if (prev) NEXT_INSN (prev) = next; if (next) PREV_INSN (next) = prev; + /* 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; + /* See sched_analyze to see how these are handled. */ if (NOTE_LINE_NUMBER (insn) != NOTE_INSN_EH_REGION_BEG && NOTE_LINE_NUMBER (insn) != NOTE_INSN_EH_REGION_END) @@ -1279,12 +1289,22 @@ unlink_line_notes (rtx insn, rtx tail) if (write_symbols != NO_DEBUG && NOTE_LINE_NUMBER (insn) > 0) { + basic_block bb = BLOCK_FOR_INSN (insn); + /* Delete the note from its current position. */ if (prev) NEXT_INSN (prev) = next; if (next) PREV_INSN (next) = prev; + /* 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; + /* Record line-number notes so they can be reused. */ LINE_NOTE (insn) = insn; } |