re PR target/56809 (Revision 197266 causes trunk ICE for arm-none-eabi targets)

gcc/
2013-04-03  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>

	PR target/56809
	* config/arm/arm.c (is_jump_table): Use next_active_insn instead of
	next_real_insn.
	(thumb1_output_casesi): Likewise.
	(thumb2_output_casesi): Likewise.

gcc/testsuite
2013-04-03  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>

	PR target/56809
	* gcc.dg/pr56809.c: New testcase.

From-SVN: r197425
This commit is contained in:
Kyrylo Tkachov 2013-04-03 15:37:31 +00:00 committed by Kyrylo Tkachov
parent 7349ed0585
commit 4a32ef809a
4 changed files with 49 additions and 4 deletions

View file

@ -1,3 +1,11 @@
2013-04-03 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
PR target/56809
* config/arm/arm.c (is_jump_table): Use next_active_insn instead of
next_real_insn.
(thumb1_output_casesi): Likewise.
(thumb2_output_casesi): Likewise.
2013-04-03 Richard Biener <rguenther@suse.de>
PR tree-optimization/56817

View file

@ -12821,8 +12821,8 @@ is_jump_table (rtx insn)
rtx table;
if (jump_to_label_p (insn)
&& ((table = next_real_insn (JUMP_LABEL (insn)))
== next_real_insn (insn))
&& ((table = next_active_insn (JUMP_LABEL (insn)))
== next_active_insn (insn))
&& table != NULL
&& JUMP_TABLE_DATA_P (table))
return table;
@ -25802,7 +25802,7 @@ arm_output_iwmmxt_tinsr (rtx *operands)
const char *
thumb1_output_casesi (rtx *operands)
{
rtx diff_vec = PATTERN (next_real_insn (operands[0]));
rtx diff_vec = PATTERN (next_active_insn (operands[0]));
gcc_assert (GET_CODE (diff_vec) == ADDR_DIFF_VEC);
@ -25825,7 +25825,7 @@ thumb1_output_casesi (rtx *operands)
const char *
thumb2_output_casesi (rtx *operands)
{
rtx diff_vec = PATTERN (next_real_insn (operands[2]));
rtx diff_vec = PATTERN (next_active_insn (operands[2]));
gcc_assert (GET_CODE (diff_vec) == ADDR_DIFF_VEC);

View file

@ -1,3 +1,8 @@
2013-04-03 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
PR target/56809
* gcc.dg/pr56809.c: New testcase.
2013-04-03 Jakub Jelinek <jakub@redhat.com>
PR debug/56819

View file

@ -0,0 +1,32 @@
/* PR target/56809 */
/* { dg-do compile } */
/* { dg-options "-Os" } */
int
foo (int mode, int i)
{
int x;
switch (mode)
{
case 0:
x = i + 1;
break;
case 1:
x = i / 2;
break;
case 2:
x = i * 3;
break;
case 3:
x = i + 3;
break;
case 4:
x = i + 5;
break;
default:
x = i - 1;
}
return x;
}