rtlanal.c (tablejump_p): Expect table and label to be adjacent.
authorSteven Bosscher <steven@gcc.gnu.org>
Thu, 30 May 2013 21:06:02 +0000 (21:06 +0000)
committerSteven Bosscher <steven@gcc.gnu.org>
Thu, 30 May 2013 21:06:02 +0000 (21:06 +0000)
       * rtlanal.c (tablejump_p): Expect table and label to be adjacent.

From-SVN: r199460

gcc/ChangeLog
gcc/rtlanal.c

index ddd2a30..660730a 100644 (file)
@@ -1,3 +1,7 @@
+2013-05-30  Steven Bosscher  <steven@gcc.gnu.org>
+
+       * rtlanal.c (tablejump_p): Expect table and label to be adjacent.
+
 2013-05-30  Vladimir Makarov  <vmakarov@redhat.com>
 
        * target.def (register_usage_leveling_p): New hook.
index b198685..fe70848 100644 (file)
@@ -2711,6 +2711,7 @@ tablejump_p (const_rtx insn, rtx *labelp, rtx *tablep)
       && (table = next_active_insn (label)) != NULL_RTX
       && JUMP_TABLE_DATA_P (table))
     {
+      gcc_assert (table == NEXT_INSN (label));
       if (labelp)
        *labelp = label;
       if (tablep)