re PR rtl-optimization/45353 (ICE: RTL check: expected elt 3 type 'B', have '0' (rtx barrier) in sel_bb_head, at sel-sched-ir.c:4329 with -fselective-scheduling and __builtin_unreachable())

PR rtl-optimization/45353
	* sel-sched-ir.c (sel_bb_head): Return NULL even if next_nonnote_insn
	after bb_note is a BARRIER.

	* gcc.dg/pr45353.c: New test.

From-SVN: r163412
This commit is contained in:
Jakub Jelinek 2010-08-20 20:07:12 +02:00 committed by Jakub Jelinek
parent bf794e41ee
commit 89ad0f25dc
4 changed files with 21 additions and 1 deletions

View File

@ -1,3 +1,9 @@
2010-08-20 Jakub Jelinek <jakub@redhat.com>
PR rtl-optimization/45353
* sel-sched-ir.c (sel_bb_head): Return NULL even if next_nonnote_insn
after bb_note is a BARRIER.
2010-08-20 Iain Sandoe <iains@gcc.gnu.org>
* config/rs6000/darwin.h (LIB_SPEC): New. Provide save/restFP by

View File

@ -4326,7 +4326,7 @@ sel_bb_head (basic_block bb)
note = bb_note (bb);
head = next_nonnote_insn (note);
if (head && BLOCK_FOR_INSN (head) != bb)
if (head && (BARRIER_P (head) || BLOCK_FOR_INSN (head) != bb))
head = NULL_RTX;
}

View File

@ -1,3 +1,8 @@
2010-08-20 Jakub Jelinek <jakub@redhat.com>
PR rtl-optimization/45353
* gcc.dg/pr45353.c: New test.
2010-08-20 Nathan Sidwell <nathan@codesourcery.com>
* gcc.target/i386/volatile-2.c: New.

View File

@ -0,0 +1,9 @@
/* PR rtl-optimization/45353 */
/* { dg-do compile } */
/* { dg-options "-O2 -fschedule-insns -fselective-scheduling" } */
void
foo ()
{
__builtin_unreachable ();
}