summaryrefslogtreecommitdiffstats
path: root/gcc/function.c
diff options
context:
space:
mode:
authorwilson <wilson@138bc75d-0d04-0410-961f-82ee72b054a4>1995-01-21 01:58:34 +0000
committerwilson <wilson@138bc75d-0d04-0410-961f-82ee72b054a4>1995-01-21 01:58:34 +0000
commit09bbf9207034ce18421e7b8a051d356c8c339d9c (patch)
tree41a003fc748ea057ce89af966f4234bb43e035e6 /gcc/function.c
parente16e0552ec842b717c81f65a0c55bec926e64695 (diff)
downloadppe42-gcc-09bbf9207034ce18421e7b8a051d356c8c339d9c.tar.gz
ppe42-gcc-09bbf9207034ce18421e7b8a051d356c8c339d9c.zip
(delete_handlers): When clear LABEL_PRESERVE_P,
also remove label from nonlocal_label list. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@8782 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/function.c')
-rw-r--r--gcc/function.c20
1 files changed, 19 insertions, 1 deletions
diff --git a/gcc/function.c b/gcc/function.c
index 73f59dab4e7..88b346cb624 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)))
OpenPOWER on IntegriCloud