re PR target/79570 (ICE in sel-sched-ir.c:4534 in pr69956.c)
authorJakub Jelinek <jakub@redhat.com>
Tue, 21 Feb 2017 16:56:11 +0000 (17:56 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Tue, 21 Feb 2017 16:56:11 +0000 (17:56 +0100)
PR target/79570
* sel-sched.c (moveup_expr_cached): Don't call sel_bb_head
on temporarily removed DEBUG_INSNs.

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

From-SVN: r245633

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

index 0697aeccb9eff88a86886df539cad3fdd6457809..a58a516b7747fc9d7525097c31dae28a2dda92ed 100644 (file)
@@ -1,5 +1,9 @@
 2017-02-21  Jakub Jelinek  <jakub@redhat.com>
 
+       PR target/79570
+       * sel-sched.c (moveup_expr_cached): Don't call sel_bb_head
+       on temporarily removed DEBUG_INSNs.
+
        PR tree-optimization/79649
        * tree-loop-distribution.c (classify_partition): Give up on
        non-generic address space loads/stores.
index 4e9c68f5a3800ac147ab8e06bdaf800dc1e0e823..708d0887e77d0bdbcdeba8a7c741012cb7bc5392 100644 (file)
@@ -2529,6 +2529,7 @@ moveup_expr_cached (expr_t expr, insn_t insn, bool inside_insn_group)
     }
 
   if (DEBUG_INSN_P (EXPR_INSN_RTX (expr))
+      && BLOCK_FOR_INSN (EXPR_INSN_RTX (expr))
       && (sel_bb_head (BLOCK_FOR_INSN (EXPR_INSN_RTX (expr)))
          == EXPR_INSN_RTX (expr)))
     /* Don't use cached information for debug insns that are heads of
index c432fb0f0c6b688e8becbf7c16b49b183a10bc33..f6f2e373347b8dc50486b9a63de933eb547ec756 100644 (file)
@@ -1,5 +1,8 @@
 2017-02-21  Jakub Jelinek  <jakub@redhat.com>
 
+       PR target/79570
+       * gcc.dg/pr79570.c: New test.
+
        PR c++/79641
        * c-c++-common/pr79641.c: New test.
 
diff --git a/gcc/testsuite/gcc.dg/pr79570.c b/gcc/testsuite/gcc.dg/pr79570.c
new file mode 100644 (file)
index 0000000..00841b9
--- /dev/null
@@ -0,0 +1,6 @@
+/* PR target/79570 */
+/* { dg-do compile { target powerpc*-*-* ia64-*-* i?86-*-* x86_64-*-* } } */
+/* { dg-options "-O2 -fselective-scheduling2 -fvar-tracking-assignments" } */
+/* { dg-warning "changes selective scheduling" "" { target *-*-* } 0 } */
+
+#include "pr69956.c"