aboutsummaryrefslogtreecommitdiff
path: root/gcc/integrate.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/integrate.c')
-rw-r--r--gcc/integrate.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/gcc/integrate.c b/gcc/integrate.c
index eba94c1..93ed6d4 100644
--- a/gcc/integrate.c
+++ b/gcc/integrate.c
@@ -1581,13 +1581,21 @@ copy_insn_list (insns, map, static_chain_value)
&& map->insn_map[INSN_UID (insn)]
&& REG_NOTES (insn))
{
- rtx tem = copy_rtx_and_substitute (REG_NOTES (insn), map, 0);
+ rtx next, note = copy_rtx_and_substitute (REG_NOTES (insn), map, 0);
/* We must also do subst_constants, in case one of our parameters
has const type and constant value. */
- subst_constants (&tem, NULL_RTX, map, 0);
+ subst_constants (&note, NULL_RTX, map, 0);
apply_change_group ();
- REG_NOTES (map->insn_map[INSN_UID (insn)]) = tem;
+ REG_NOTES (map->insn_map[INSN_UID (insn)]) = note;
+
+ /* Finally, delete any REG_LABEL notes from the chain. */
+ for (; note; note = next)
+ {
+ next = XEXP (note, 1);
+ if (REG_NOTE_KIND (note) == REG_LABEL)
+ remove_note (map->insn_map[INSN_UID (insn)], note);
+ }
}
if (local_return_label)