Patch: clear NEXT_INSN, PREV_INSN and JUMP_LABEL on deleted insns

Richard Guenther
Sat Sep 8 19:11:00 GMT 2007

On 9/5/07, Laurynas Biveinis <> wrote:
> Hello,
> This cleanup patch changes remove_insn to clear NEXT_INSN, PREV_INSN,
> and if applicable, JUMP_LABEL fields on the deleted insn. This exposed
> several places where these insn fields were in fact accessed after the
> insn was deleted and this patch fixes them all, in a sense completing
> transition to FOR_BB_INSNS_SAFE.
> The motivation for this change is general cleanliness and also the
> fact, that some GC implementations (e.g. Boehm's GC) put inaccessible
> objects on the free lists without cleaning them and later tries to
> mark them. Also, it is a little step towards being able to do GC
> collection at arbitrary points.
> It is quite possible that my testing did not detect all the places
> where the fields are accessed after deletion and thus breaks
> something. Luckily, any such places should be easy to fix.
> The patch seems larger than it is because of necessary indentation
> changes. Bootstrapped/regtested on i686-pc-linux-gnu. OK for mainline?

FYI this patch has caused at least PR33351 on i686 and from hearsay
similar problems on other architectures.  Looks like you missed to
update some places?


More information about the Gcc-patches mailing list