From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31488 invoked by alias); 18 Jun 2014 08:19:53 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 31434 invoked by uid 48); 18 Jun 2014 08:19:48 -0000 From: "rsandifo at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/61268] [4.10 regression] ICE in vt_expand_var_loc_chain, at var-tracking.c:8262 Date: Wed, 18 Jun 2014 08:19:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: middle-end X-Bugzilla-Version: 4.10.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: rsandifo at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: rsandifo at gcc dot gnu.org X-Bugzilla-Target-Milestone: 4.10.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_status assigned_to attachments.created Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2014-06/txt/msg01542.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61268 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 --- 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?