]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR rtl-optimization/45353 (ICE: RTL check: expected elt 3 type 'B', have '0' ...
authorJakub Jelinek <jakub@redhat.com>
Fri, 20 Aug 2010 18:07:12 +0000 (20:07 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Fri, 20 Aug 2010 18:07:12 +0000 (20:07 +0200)
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

gcc/ChangeLog
gcc/sel-sched-ir.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/pr45353.c [new file with mode: 0644]

index 3c3af514a389251d147c0699e06b909fc6f9a59d..68d8c1066cb2bea25d12df25a1ac12dcaeb0af18 100644 (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 
index f23b7cf8d983f61bce76b35d74e8b9aeaf6e3ed4..a9d7ccf0fcdeacba79b0f877f6ee6c7de4104e32 100644 (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;
     }
 
index 7d15024c0ade42bfee37fb910280da2117b4edcd..0c1b613c7df13eeffea37b5d9ef3f89bb29c74fd 100644 (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.
diff --git a/gcc/testsuite/gcc.dg/pr45353.c b/gcc/testsuite/gcc.dg/pr45353.c
new file mode 100644 (file)
index 0000000..e3277a8
--- /dev/null
@@ -0,0 +1,9 @@
+/* PR rtl-optimization/45353 */
+/* { dg-do compile } */
+/* { dg-options "-O2 -fschedule-insns -fselective-scheduling" } */
+
+void
+foo ()
+{
+  __builtin_unreachable ();
+}