From: Jakub Jelinek Date: Tue, 30 Sep 2014 10:30:45 +0000 (+0200) Subject: re PR inline-asm/63282 (ICE in redirect_jump_1) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b58fd59ad5ece79c494cbac3b30ff2ca8458563a;p=gcc.git re PR inline-asm/63282 (ICE in redirect_jump_1) 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: r215712 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 766e935638b..47964d9ddcb 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2014-09-30 Jakub Jelinek + + 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-30 Terry Guo * config/arm/arm-cores.def (cortex-m7): New core name. diff --git a/gcc/ifcvt.c b/gcc/ifcvt.c index 6bcc23afc10..b6b479f39a5 100644 --- a/gcc/ifcvt.c +++ b/gcc/ifcvt.c @@ -4357,6 +4357,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_FOR_FN (cfun)) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 4f608cf2103..8e51806c281 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2014-09-30 Jakub Jelinek + + PR inline-asm/63282 + * gcc.c-torture/compile/pr63282.c: New test. + 2014-09-29 Eric Botcazou * gcc.dg/tree-ssa/vrp94.c: New test. diff --git a/gcc/testsuite/gcc.c-torture/compile/pr63282.c b/gcc/testsuite/gcc.c-torture/compile/pr63282.c new file mode 100644 index 00000000000..cb23278d50d --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/compile/pr63282.c @@ -0,0 +1,13 @@ +/* PR inline-asm/63282 */ + +void bar (void); + +void +foo (void) +{ + asm volatile goto ("" : : : : a, b); +a: + bar (); +b: + return; +}