On Wed, Apr 20, 2016 at 02:22:19AM -0400, tbsaunde+...@tbsaunde.org wrote: > --- a/gcc/cfgrtl.c > +++ b/gcc/cfgrtl.c > @@ -157,7 +157,14 @@ delete_insn (rtx uncast_insn) > } > } > > - remove_node_from_insn_list (insn, &nonlocal_goto_handler_labels); > + > + unsigned int len = vec_safe_length (nonlocal_goto_handler_labels); > + for (unsigned int i = 0; i < len; i++) > + if ((*nonlocal_goto_handler_labels)[i] == insn) > + { > + nonlocal_goto_handler_labels->ordered_remove (i); > + break; > + } > }
Maybe you want a new helper function for this? > @@ -4255,11 +4259,10 @@ cfg_layout_initialize (unsigned int flags) > record_effective_endpoints (); > > /* Make sure that the targets of non local gotos are marked. */ > - for (x = nonlocal_goto_handler_labels; x; x = x->next ()) > - { > - bb = BLOCK_FOR_INSN (x->insn ()); > - bb->flags |= BB_NON_LOCAL_GOTO_TARGET; > - } > + rtx_insn *temp; > + unsigned int i; > + FOR_EACH_VEC_SAFE_ELT_REVERSE (nonlocal_goto_handler_labels, i, temp) > + BLOCK_FOR_INSN (temp)->flags |= BB_NON_LOCAL_GOTO_TARGET; Bad indent. > @@ -3877,9 +3877,10 @@ set_initial_label_offsets (void) > if (x->insn ()) > set_label_offsets (x->insn (), NULL, 1); > > - for (rtx_insn_list *x = nonlocal_goto_handler_labels; x; x = x->next ()) > - if (x->insn ()) > - set_label_offsets (x->insn (), NULL, 1); > + rtx_insn *insn; > + unsigned int i; > + FOR_EACH_VEC_SAFE_ELT_REVERSE (nonlocal_goto_handler_labels, i, insn) > + set_label_offsets (insn, NULL, 1); Bad indent. Segher