OSDN Git Service

* cfgrtl.c (delete_insn): Check for not NOTE_INSN_DELETED_LABEL
authorrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 31 Dec 2001 21:33:19 +0000 (21:33 +0000)
committerrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 31 Dec 2001 21:33:19 +0000 (21:33 +0000)
        before decrementing LABEL_NUSES from a jump table.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@48431 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/cfgrtl.c

index e7e6e69..56b3bf2 100644 (file)
@@ -161,7 +161,15 @@ delete_insn (insn)
       int i;
 
       for (i = 0; i < len; i++)
-       LABEL_NUSES (XEXP (XVECEXP (pat, diff_vec_p, i), 0))--;
+       {
+         rtx label = XEXP (XVECEXP (pat, diff_vec_p, i), 0);
+
+         /* When deleting code in bulk (e.g. removing many unreachable
+            blocks) we can delete a label that's a target of the vector
+            before deleting the vector itself.  */
+         if (GET_CODE (label) != NOTE)
+           LABEL_NUSES (label)--;
+       }
     }
 
   return next;