diff options
author | Richard Henderson <rth@gcc.gnu.org> | 2001-12-31 13:33:19 -0800 |
---|---|---|
committer | Richard Henderson <rth@gcc.gnu.org> | 2001-12-31 13:33:19 -0800 |
commit | a124fcda15387389a151fb89bc533965d3c2eb53 (patch) | |
tree | 9e1f69103470c9ac37f72bf3fd4c899bfc6f1f0d /gcc | |
parent | 6d66e50d528d1a003fe040606050066e76fcb99a (diff) | |
download | gcc-a124fcda15387389a151fb89bc533965d3c2eb53.zip gcc-a124fcda15387389a151fb89bc533965d3c2eb53.tar.gz gcc-a124fcda15387389a151fb89bc533965d3c2eb53.tar.bz2 |
cfgrtl.c (delete_insn): Check for not NOTE_INSN_DELETED_LABEL before decrementing LABEL_NUSES from a...
* cfgrtl.c (delete_insn): Check for not NOTE_INSN_DELETED_LABEL
before decrementing LABEL_NUSES from a jump table.
From-SVN: r48431
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/cfgrtl.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/gcc/cfgrtl.c b/gcc/cfgrtl.c index e7e6e69..56b3bf2 100644 --- a/gcc/cfgrtl.c +++ b/gcc/cfgrtl.c @@ -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; |