diff options
author | Jim Wilson <wilson@gcc.gnu.org> | 1995-01-20 17:58:34 -0800 |
---|---|---|
committer | Jim Wilson <wilson@gcc.gnu.org> | 1995-01-20 17:58:34 -0800 |
commit | 71cd4a8d33c7bf342893920d2e6eb7148414e3d4 (patch) | |
tree | 41a003fc748ea057ce89af966f4234bb43e035e6 /gcc | |
parent | 275c708029ff82ea99b886d5496d08f1fbfdffb4 (diff) | |
download | gcc-71cd4a8d33c7bf342893920d2e6eb7148414e3d4.zip gcc-71cd4a8d33c7bf342893920d2e6eb7148414e3d4.tar.gz gcc-71cd4a8d33c7bf342893920d2e6eb7148414e3d4.tar.bz2 |
(delete_handlers): When clear LABEL_PRESERVE_P,
also remove label from nonlocal_label list.
From-SVN: r8782
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/function.c | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/gcc/function.c b/gcc/function.c index 73f59da..88b346c 100644 --- a/gcc/function.c +++ b/gcc/function.c @@ -2957,7 +2957,25 @@ delete_handlers () Also permit deletion of the nonlocal labels themselves if nothing local refers to them. */ if (GET_CODE (insn) == CODE_LABEL) - LABEL_PRESERVE_P (insn) = 0; + { + tree t, last_t; + + LABEL_PRESERVE_P (insn) = 0; + + /* Remove it from the nonlocal_label list, to avoid confusing + flow. */ + for (t = nonlocal_labels, last_t = 0; t; + last_t = t, t = TREE_CHAIN (t)) + if (DECL_RTL (TREE_VALUE (t)) == insn) + break; + if (t) + { + if (! last_t) + nonlocal_labels = TREE_CHAIN (nonlocal_labels); + else + TREE_CHAIN (last_t) = TREE_CHAIN (t); + } + } if (GET_CODE (insn) == INSN && ((nonlocal_goto_handler_slot != 0 && reg_mentioned_p (nonlocal_goto_handler_slot, PATTERN (insn))) |