From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 401 invoked by alias); 19 Feb 2010 22:34:55 -0000 Received: (qmail 392 invoked by uid 22791); 19 Feb 2010 22:34:55 -0000 X-SWARE-Spam-Status: No, hits=-6.9 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 19 Feb 2010 22:34:50 +0000 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o1JMYn6o024137 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 19 Feb 2010 17:34:49 -0500 Received: from tyan-ft48-01.lab.bos.redhat.com (tyan-ft48-01.lab.bos.redhat.com [10.16.42.4]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o1JMYlkX015616 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 19 Feb 2010 17:34:48 -0500 Received: from tyan-ft48-01.lab.bos.redhat.com (localhost [127.0.0.1]) by tyan-ft48-01.lab.bos.redhat.com (8.14.3/8.14.3) with ESMTP id o1JMfAKT015937; Fri, 19 Feb 2010 23:41:10 +0100 Received: (from jakub@localhost) by tyan-ft48-01.lab.bos.redhat.com (8.14.3/8.14.3/Submit) id o1JMf97w015936; Fri, 19 Feb 2010 23:41:09 +0100 Date: Fri, 19 Feb 2010 22:34:00 -0000 From: Jakub Jelinek To: Jason Merrill Cc: gcc-patches List Subject: Re: RFA: PATCH to expand_used_vars for debug/42800 Message-ID: <20100219224109.GI2817@tyan-ft48-01.lab.bos.redhat.com> Reply-To: Jakub Jelinek References: <4B7F0E4E.4090902@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4B7F0E4E.4090902@redhat.com> User-Agent: Mutt/1.5.20 (2009-08-17) X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2010-02/txt/msg00804.txt.bz2 On Fri, Feb 19, 2010 at 05:18:54PM -0500, Jason Merrill wrote: > The problem is this PR is that when are writing out the debug info > for the temporary containing the upper bound of the VLA, its rtl > still refers to virtual regs, so dwarf2out gives up and doesn't emit > any debug info for the upper bound. This happens because the Expand > from SSA patch broke Jakub's patch for PR 34037, such that > expand_used_vars is no longer re-adding the variable to > cfun->local_decls. > > The patch adjusts the logic in expand_used_vars so that the PR 34037 > fix is executed again for this variable. > > I have also attached a second (alternative) patch which fixes the > symptom by calling instantiate_decl_rtl from dwarf2out. This patch > is lower in impact, but I think the first patch is safe enough that > we don't need to be this conservative. I'd prefer the first patch. Reminds me we should attempt to do something useful even for -O+ (make sure we have a debug stmt/DEBUG_INSN for the bounds and that var-tracking tracks even these artificial vars. Jakub