]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR inline-asm/63282 (ICE in redirect_jump_1)
authorJakub Jelinek <jakub@redhat.com>
Tue, 30 Sep 2014 10:39:03 +0000 (12:39 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Tue, 30 Sep 2014 10:39:03 +0000 (12:39 +0200)
PR inline-asm/63282
* ifcvt.c (dead_or_predicable): Don't call redirect_jump_1
or invert_jump_1 if jump isn't any_condjump_p.

* gcc.c-torture/compile/pr63282.c: New test.

From-SVN: r215714

gcc/ChangeLog
gcc/ifcvt.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.c-torture/compile/pr63282.c [new file with mode: 0644]

index 86cc14fad27f7d98c70d80b72ac4c9ba2f556d38..71a9fbef630d9cdb469acd57c4ea4ea1af219d13 100644 (file)
@@ -1,3 +1,9 @@
+2014-09-30  Jakub Jelinek  <jakub@redhat.com>
+
+       PR inline-asm/63282
+       * ifcvt.c (dead_or_predicable): Don't call redirect_jump_1
+       or invert_jump_1 if jump isn't any_condjump_p.
+
 2014-09-29  Charles Baylis  <charles.baylis@linaro.org>
 
        Backport from mainline r212303
index dd6df5bc80a6e918c295558ca5d88d3f0f841a82..70a84d25775583719293c260758b91f6aea11341 100644 (file)
@@ -4271,6 +4271,9 @@ dead_or_predicable (basic_block test_bb, basic_block merge_bb,
   old_dest = JUMP_LABEL (jump);
   if (other_bb != new_dest)
     {
+      if (!any_condjump_p (jump))
+       goto cancel;
+
       if (JUMP_P (BB_END (dest_edge->src)))
        new_dest_label = JUMP_LABEL (BB_END (dest_edge->src));
       else if (new_dest == EXIT_BLOCK_PTR)
index 7143edb80beb0c963a703685b4c4c55e1dbe56b5..7bcdf7a9e00a19c21854d4110f1eb71192c80f20 100644 (file)
@@ -1,3 +1,8 @@
+2014-09-30  Jakub Jelinek  <jakub@redhat.com>
+
+       PR inline-asm/63282
+       * gcc.c-torture/compile/pr63282.c: New test.
+
 2014-09-26  Jakub Jelinek  <jakub@redhat.com>
 
        * g++.dg/compat/struct-layout-1_generate.c: Add -Wno-abi
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr63282.c b/gcc/testsuite/gcc.c-torture/compile/pr63282.c
new file mode 100644 (file)
index 0000000..cb23278
--- /dev/null
@@ -0,0 +1,13 @@
+/* PR inline-asm/63282 */
+
+void bar (void);
+
+void
+foo (void)
+{
+  asm volatile goto ("" : : : : a, b);
+a:
+  bar ();
+b:
+  return;
+}