From patchwork Mon Jun 1 08:04:25 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Biener X-Patchwork-Id: 478804 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id D74AC140FDF for ; Mon, 1 Jun 2015 18:04:47 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=ha8Hlxs0; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :mime-version:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; q=dns; s=default; b=eYCDr/dPyAxL6yUFwT FrjSiFW5Vl+CWswrCPQ9VjvLI8rfnM+YMvgOg1Frh7bmj1lt1BaDBDYLln8AARrX wz01ngu9k9Mt31EEH0zTgx7+xn1kIF1GEDQlIERpzCO5zCecz4snAaRh2YC9UhuA HBriEHWBIJNoc9ip50bOoZvqM= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :mime-version:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; s=default; bh=vi+GXTMl4kCxZzIAcGjQTSqF 3qc=; b=ha8Hlxs0sfUVQ1Z/iIHwLdpnCMMdzZp5PikZiN/YN0JFN7DE6tlfpEV2 L/o2beXwc3cORCGk9IlqtNFJlAwP8MH+c5KblRRiKvdSCMNYChXnGYSBs8sNYrcX 2/DetU7PMv5lItLtWiCprmdkXJYEVeC9jh6o5EOt4h3Nw90Lr5M= Received: (qmail 4217 invoked by alias); 1 Jun 2015 08:04:30 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 4126 invoked by uid 89); 1 Jun 2015 08:04:29 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL, BAYES_00, FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-ob0-f173.google.com Received: from mail-ob0-f173.google.com (HELO mail-ob0-f173.google.com) (209.85.214.173) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Mon, 01 Jun 2015 08:04:27 +0000 Received: by obbnx5 with SMTP id nx5so97298344obb.0 for ; Mon, 01 Jun 2015 01:04:26 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.202.228.85 with SMTP id b82mr10766383oih.58.1433145866022; Mon, 01 Jun 2015 01:04:26 -0700 (PDT) Received: by 10.76.115.167 with HTTP; Mon, 1 Jun 2015 01:04:25 -0700 (PDT) In-Reply-To: References: <554C060F.6000609@redhat.com> <555CAD35.5040304@redhat.com> <5565BB13.6040205@redhat.com> <5567643C.1020306@redhat.com> <55677C05.6040302@redhat.com> <5568B32A.1010100@redhat.com> <78B564EA-B9C4-4351-BFD0-9C78EA4C2528@gmail.com> <5568BF0A.7070903@redhat.com> <556A5B43.7050105@redhat.com> <556B7132.7010504@redhat.com> Date: Mon, 1 Jun 2015 10:04:25 +0200 Message-ID: Subject: Re: [patch 10/10] debug-early merge: compiler proper From: Richard Biener To: Jason Merrill Cc: Aldy Hernandez , Jan Hubicka , gcc-patches X-IsSubscribed: yes On Mon, Jun 1, 2015 at 10:03 AM, Richard Biener wrote: > On Sun, May 31, 2015 at 10:38 PM, Jason Merrill wrote: >> On 05/30/2015 08:52 PM, Aldy Hernandez wrote: >>> >>> On 05/29/2015 03:33 PM, Jason Merrill wrote: >>>> >>>> On 05/29/2015 03:26 PM, Richard Biener wrote: >>>>> >>>>> ISTR I had to mark the gimple reg used for the bound as >>>>> non-DECL_IGNORED for the LTO stuff. >>>> >>>> >>>> Let's go with that, then. >>> >>> >>> Well, I did play around with that option originally, but temporaries do >>> not end up in the symbol table, so we won't see them to feed them to >>> late_global_decl. >> >> >> The temporary has function scope, so I don't see why that would be an issue. > > Yeah, we should walk it via the function_decl hook on the containing function. Btw, the following was my gimplify.c hunk: > Richard. > >> Jason >> diff --git a/gcc/gimplify.c b/gcc/gimplify.c index d822913..10a9318 100644 --- a/gcc/gimplify.c +++ b/gcc/gimplify.c @@ -8994,6 +8994,12 @@ gimplify_one_sizepos (tree *expr_p, gimple_seq *stmt_p) *expr_p = unshare_expr (expr); gimplify_expr (expr_p, stmt_p, NULL, is_gimple_val, fb_rvalue); + + /* The possibly generated temporary is interesting for debug information + to complete the VLA type sizes and bounds. Clear DECL_IGNORED_P. */ + if (TREE_CODE (*expr_p) == VAR_DECL + && DECL_ARTIFICIAL (*expr_p)) + DECL_IGNORED_P (*expr_p) = false; } /* Gimplify the body of statements of FNDECL and return a GIMPLE_BIND node