From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 39486 invoked by alias); 15 Aug 2017 11:17:22 -0000 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 Received: (qmail 14523 invoked by uid 89); 15 Aug 2017 11:17:03 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.5 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,RCVD_IN_SORBS_SPAM,SPF_PASS autolearn=no version=3.3.2 spammy=dance X-HELO: mail-wm0-f65.google.com Received: from mail-wm0-f65.google.com (HELO mail-wm0-f65.google.com) (74.125.82.65) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 15 Aug 2017 11:17:01 +0000 Received: by mail-wm0-f65.google.com with SMTP id q189so1130983wmd.0 for ; Tue, 15 Aug 2017 04:16:59 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=/Sj8rjSi/xN7s0JuX+NQi4aNA3cJ4H/kTqtOkAHs5hQ=; b=iBKvmgzwUT8dMoGOrjuLrS0C5QC2hnafAd96bpRGHZs9NTTlrn2uy9egELQIDCooG+ 2ILM9dgM3lEE0TJOqIAZGcULd3pMvFwQmLElPi6iD74KrLbc7ktQkS0/gyTICFEifuGF 86DY0W5NzBQVUS/Fwe5ahNdiZm9FWyfa1V+PVjH8YulwTkacffc/wOm3d5P8fzgai87a fHU27HqWTqmZHrUAC7bQhLzdfv3ZjrTDBteV3rw5jmmxGyC945rYoBX8a2FicB9RiotX xoxl2725s+qvGYsz2IBd8NvdzNVVu9UckwuegbnsZkPSOQ1zbRSdqZMH3dXaf6dJMe8o 1FVQ== X-Gm-Message-State: AHYfb5jM2YkateI1lx5Eq/Ydi14h3eW7LWkI9g7PhbmszNuvy6T0Kq68 7D/P7Cm3bFf9GLFj3RNC68263bFgpQ== X-Received: by 10.80.194.146 with SMTP id o18mr14816681edf.197.1502795817721; Tue, 15 Aug 2017 04:16:57 -0700 (PDT) MIME-Version: 1.0 Received: by 10.80.180.249 with HTTP; Tue, 15 Aug 2017 04:16:57 -0700 (PDT) In-Reply-To: <2218947e-e30b-cc03-1421-27a17b8b7042@adacore.com> References: <20170314122410.21497-1-derodat@adacore.com> <4506b40b-f2a4-5ed8-42d9-62902d9fb288@redhat.com> <2218947e-e30b-cc03-1421-27a17b8b7042@adacore.com> From: Richard Biener Date: Tue, 15 Aug 2017 12:38:00 -0000 Message-ID: Subject: Re: [PATCH] [PR79542][Ada] Fix ICE in dwarf2out.c with nested func. inlining To: Pierre-Marie de Rodat Cc: Jason Merrill , gcc-patches List Content-Type: text/plain; charset="UTF-8" X-IsSubscribed: yes X-SW-Source: 2017-08/txt/msg00925.txt.bz2 On Sat, Aug 12, 2017 at 11:09 AM, Pierre-Marie de Rodat wrote: > On 08/11/2017 11:29 PM, Jason Merrill wrote: >> >> OK. > > > Committed. Thank you for your sustained review effort, Jason. :-) The way you use decl_ultimate_origin conflicts with the early LTO debug patches which make dwarf2out_abstract_function call set_decl_origin_self and thus the assert in gen_typedef_die triggers (and the rest probably misbehaves). Now I wonder whether we at any point need that self-origin? Currently it's set via static dw_die_ref gen_decl_die (tree decl, tree origin, struct vlr_context *ctx, dw_die_ref context_die) { ... case FUNCTION_DECL: #if 0 /* FIXME */ /* This doesn't work because the C frontend sets DECL_ABSTRACT_ORIGIN on local redeclarations of global functions. That seems broken. */ if (current_function_decl != decl) /* This is only a declaration. */; #endif /* If we're emitting a clone, emit info for the abstract instance. */ if (origin || DECL_ORIGIN (decl) != decl) dwarf2out_abstract_function (origin ? DECL_ORIGIN (origin) : DECL_ABSTRACT_ORIGIN (decl)); /* If we're emitting an out-of-line copy of an inline function, emit info for the abstract instance and set up to refer to it. */ else if (cgraph_function_possibly_inlined_p (decl) && ! DECL_ABSTRACT_P (decl) && ! class_or_namespace_scope_p (context_die) /* dwarf2out_abstract_function won't emit a die if this is just a declaration. We must avoid setting DECL_ABSTRACT_ORIGIN in that case, because that works only if we have a die. */ && DECL_INITIAL (decl) != NULL_TREE) { dwarf2out_abstract_function (decl); set_decl_origin_self (decl); } ok, not doing this at all doesn't work, doing it only in the above case neither. Bah. Can anyone explain to me why we do the set_decl_origin_self dance? Richard. > -- > Pierre-Marie de Rodat