Commit 4a32ef80 by Kyrylo Tkachov Committed by Kyrylo Tkachov

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
parent 7349ed05
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> 2013-04-03 Richard Biener <rguenther@suse.de>
PR tree-optimization/56817 PR tree-optimization/56817
......
...@@ -12821,8 +12821,8 @@ is_jump_table (rtx insn) ...@@ -12821,8 +12821,8 @@ is_jump_table (rtx insn)
rtx table; rtx table;
if (jump_to_label_p (insn) if (jump_to_label_p (insn)
&& ((table = next_real_insn (JUMP_LABEL (insn))) && ((table = next_active_insn (JUMP_LABEL (insn)))
== next_real_insn (insn)) == next_active_insn (insn))
&& table != NULL && table != NULL
&& JUMP_TABLE_DATA_P (table)) && JUMP_TABLE_DATA_P (table))
return table; return table;
...@@ -25802,7 +25802,7 @@ arm_output_iwmmxt_tinsr (rtx *operands) ...@@ -25802,7 +25802,7 @@ arm_output_iwmmxt_tinsr (rtx *operands)
const char * const char *
thumb1_output_casesi (rtx *operands) 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); gcc_assert (GET_CODE (diff_vec) == ADDR_DIFF_VEC);
...@@ -25825,7 +25825,7 @@ thumb1_output_casesi (rtx *operands) ...@@ -25825,7 +25825,7 @@ thumb1_output_casesi (rtx *operands)
const char * const char *
thumb2_output_casesi (rtx *operands) 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); gcc_assert (GET_CODE (diff_vec) == ADDR_DIFF_VEC);
......
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> 2013-04-03 Jakub Jelinek <jakub@redhat.com>
PR debug/56819 PR debug/56819
......
/* 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;
}
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