Commit ae486e62 by Eric Botcazou Committed by Eric Botcazou

re PR middle-end/86864 (ICE in commit_one_edge_insertion on switch construct)

	PR middle-end/86864
	* cfgexpand.c (expand_gimple_basic_block): Be prepared for a BARRIER
	before and after a JUMP_TABLE_DATA.

From-SVN: r264342
parent 19d6277c
2018-09-15 Eric Botcazou <ebotcazou@adacore.com>
PR middle-end/86864
* cfgexpand.c (expand_gimple_basic_block): Be prepared for a BARRIER
before and after a JUMP_TABLE_DATA.
2018-09-14 John David Anglin <danglin@gcc.gnu.org>
PR middle-end/87188
......
......@@ -5817,6 +5817,8 @@ expand_gimple_basic_block (basic_block bb, bool disable_tail_calls)
last = PREV_INSN (last);
if (JUMP_TABLE_DATA_P (last))
last = PREV_INSN (PREV_INSN (last));
if (BARRIER_P (last))
last = PREV_INSN (last);
BB_END (bb) = last;
update_bb_for_insn (bb);
......
2018-09-15 Eric Botcazou <ebotcazou@adacore.com>
* gcc.c-torture/compile/20180915-1.c: New test.
2018-09-14 David Malcolm <dmalcolm@redhat.com>
PR c/82967
......
/* PR middle-end/86864 */
/* Testcase by Serge Belyshev <belyshev@depni.sinp.msu.ru> */
long a;
void f ();
void g (int b, int c, int d)
{
switch (b)
{
case 42:
case 29:
case 48:
case 40:
case 32:
c = 2;
break;
case 0:
c = 1;
break;
default:
__builtin_unreachable ();
}
if (d || a)
f ();
if (c == 1)
f ();
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment