https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61268
rsandifo at gcc dot gnu.org <rsandifo at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED Assignee|unassigned at gcc dot gnu.org |rsandifo at gcc dot gnu.org --- Comment #5 from rsandifo at gcc dot gnu.org <rsandifo at gcc dot gnu.org> --- Created attachment 32962 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=32962&action=edit Proposed patch This was caused by some invalid rtl sharing between DECL_INCOMING_RTL and the insn stream. I think the right fix is (a) to copy stack_parm and entry_parm before using them in the rtl stream and (b) as compensation, to allow validize_mem to modify its argument in-place. As well as fixing the bug, this seems to reduce the total amount of rtl copying required. Of course, the problem with (b) is that this could in turn expose other invalid sharing bugs, so it's a bit frying-pan-to-fire. I've tried to look through all calls to validize_mem to see which might be affected. The patch passed bootstrap on x86_64-linux-gnu but could you test it for sparc too?