diff options
author | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-12-31 21:33:19 +0000 |
---|---|---|
committer | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-12-31 21:33:19 +0000 |
commit | fd0d7f8c1b997249afb80ea8c293cf493d75e573 (patch) | |
tree | 9e1f69103470c9ac37f72bf3fd4c899bfc6f1f0d /gcc/cfgrtl.c | |
parent | 41dd14224fd9b6b3174403823a01e048b9e4718f (diff) | |
download | gcc-fd0d7f8c1b997249afb80ea8c293cf493d75e573.tar.gz |
* cfgrtl.c (delete_insn): Check for not NOTE_INSN_DELETED_LABEL
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
Diffstat (limited to 'gcc/cfgrtl.c')
-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 e7e6e699acc..56b3bf28e6a 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; |