re PR target/56809 (Revision 197266 causes trunk ICE for arm-none-eabi targets)
authorKyrylo Tkachov <kyrylo.tkachov@arm.com>
Wed, 3 Apr 2013 15:37:31 +0000 (15:37 +0000)
committerKyrylo Tkachov <ktkachov@gcc.gnu.org>
Wed, 3 Apr 2013 15:37:31 +0000 (15:37 +0000)
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

gcc/ChangeLog
gcc/config/arm/arm.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/pr56809.c [new file with mode: 0644]

index f6b00ca6700bf29e492ea1c37072a554d4246e35..9ce142c7707dc02675f96dd0afdb0c6edf63c5f4 100644 (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
index fe6902f2225c1aad16c1ce84c19b7eb9025f3024..f5676e0965acef786188690f856e2be604246756 100644 (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);
 
index 7e16812c071273a7162ad106ee9156c1de468e9a..5e64fa68db9aa7a33d7f0766a056b66885a5bb54 100644 (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
diff --git a/gcc/testsuite/gcc.dg/pr56809.c b/gcc/testsuite/gcc.dg/pr56809.c
new file mode 100644 (file)
index 0000000..3f1f311
--- /dev/null
@@ -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;
+}