[{"id":1761029,"web_url":"http://patchwork.ozlabs.org/comment/1761029/","msgid":"<alpine.LSU.2.20.1708311554120.14191@zhemvz.fhfr.qr>","list_archive_url":null,"date":"2017-08-31T14:03:38","subject":"Re: [PATCH] Early LTO debug TODO","submitter":{"id":4338,"url":"http://patchwork.ozlabs.org/api/people/4338/","name":"Richard Biener","email":"rguenther@suse.de"},"content":"On Thu, 31 Aug 2017, Richard Biener wrote:\n\n> \n> As suspected during review the DECL_ABSTRACT_P handling in\n> gen_formal_parameter_die is no longer necessary so the following\n> patch removes it.\n> \n> [LTO] bootstrapped on x86_64-unknown-linux-gnu, testing in progress.\n> The gdb testsuite shows no regression.\n> \n> Will apply after testing finished.\n\nOk, so it doesn't work - it regresses for example \ngcc.dg/debug/dwarf2/inline1.c because we end up annotating the\nabstract DIE with a location.  This is because in gen_subprogram_die\n(with decl set as abstract-self and thus generating a concrete\ninstance subroutine die) we call\n\n          else if (parm && !POINTER_BOUNDS_P (parm))\n            {\n              dw_die_ref parm_die = gen_decl_die (parm, NULL, NULL, \nsubr_die);\n\nthus unconditionally pass NULL as origin where gen_formal_parameter_die\njust has\n\n  /* If we have a previously generated DIE, use it, unless this is an\n     concrete instance (origin != NULL), in which case we need a new\n     DIE with a corresponding DW_AT_abstract_origin.  */\n  bool reusing_die;\n  if (parm_die && origin == NULL)\n    reusing_die = true;\n  else\n    {\n      parm_die = new_die (DW_TAG_formal_parameter, context_die, node);\n      reusing_die = false;\n    }\n\nbut obviously that logic is flawed with us passing origin as NULL...\n\nWhat saved us here is the check whether the existing param_die has\nthe correct parent, if not we didn't re-use it.  OTOH for die_parent\n== NULL we have the extra check that would have been dead code.\n\nAny hint as to whether we should pass in anything as origin or\nwhether we should keep the existing die_parent logic somehow?\n(do we ever get a NULL context_die passed?)\n\nAnyway, retracting the patch for now -- at least the comment above\ndoesn't match reality (we're getting origin == NULL for the\nconcrete instance).\n\nThanks,\nRichard.\n\n\n> Richard.\n> \n> 2017-08-31  Richard Biener  <rguenther@suse.de>\n> \n> \t* dwarf2out.c (gen_formal_parameter_die): Remove no longer\n> \tneeded DECL_ABSTRACT_P handling.\n> \n> Index: gcc/dwarf2out.c\n> ===================================================================\n> --- gcc/dwarf2out.c\t(revision 251559)\n> +++ gcc/dwarf2out.c\t(working copy)\n> @@ -21288,28 +21288,9 @@ gen_formal_parameter_die (tree node, tre\n>    tree ultimate_origin;\n>    dw_die_ref parm_die = NULL;\n>    \n> -  if (TREE_CODE_CLASS (TREE_CODE (node_or_origin)) == tcc_declaration)\n> +  if (DECL_P (node_or_origin))\n>      {\n>        parm_die = lookup_decl_die (node);\n> -\n> -      /* If the contexts differ, we may not be talking about the same\n> -\t thing.\n> -\t ???  When in LTO the DIE parent is the \"abstract\" copy and the\n> -\t context_die is the specification \"copy\".  But this whole block\n> -\t should eventually be no longer needed.  */\n> -      if (parm_die && parm_die->die_parent != context_die && !in_lto_p)\n> -\t{\n> -\t  if (!DECL_ABSTRACT_P (node))\n> -\t    {\n> -\t      /* This can happen when creating an inlined instance, in\n> -\t\t which case we need to create a new DIE that will get\n> -\t\t annotated with DW_AT_abstract_origin.  */\n> -\t      parm_die = NULL;\n> -\t    }\n> -\t  else\n> -\t    gcc_unreachable ();\n> -\t}\n> -\n>        if (parm_die && parm_die->die_parent == NULL)\n>  \t{\n>  \t  /* Check that parm_die already has the right attributes that\n>","headers":{"Return-Path":"<gcc-patches-return-461209-incoming=patchwork.ozlabs.org@gcc.gnu.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":["patchwork-incoming@bilbo.ozlabs.org","mailing list gcc-patches@gcc.gnu.org"],"Authentication-Results":["ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=gcc.gnu.org\n\t(client-ip=209.132.180.131; helo=sourceware.org;\n\tenvelope-from=gcc-patches-return-461209-incoming=patchwork.ozlabs.org@gcc.gnu.org;\n\treceiver=<UNKNOWN>)","ozlabs.org; dkim=pass (1024-bit key;\n\tunprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org\n\theader.b=\"DrjvSAMi\"; dkim-atps=neutral","sourceware.org; auth=none"],"Received":["from sourceware.org (server1.sourceware.org [209.132.180.131])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xjkcx3dfqz9sD9\n\tfor <incoming@patchwork.ozlabs.org>;\n\tFri,  1 Sep 2017 00:04:00 +1000 (AEST)","(qmail 70550 invoked by alias); 31 Aug 2017 14:03:51 -0000","(qmail 70540 invoked by uid 89); 31 Aug 2017 14:03:51 -0000","from mx2.suse.de (HELO mx1.suse.de) (195.135.220.15) by\n\tsourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP;\n\tThu, 31 Aug 2017 14:03:41 +0000","from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254])\tby\n\tmx1.suse.de (Postfix) with ESMTP id 0A1E4AC9F;\n\tThu, 31 Aug 2017 14:03:39 +0000 (UTC)"],"DomainKey-Signature":"a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id\n\t:list-unsubscribe:list-archive:list-post:list-help:sender:date\n\t:from:to:cc:subject:in-reply-to:message-id:references\n\t:mime-version:content-type; q=dns; s=default; b=MX+rN6N1tigFu6MX\n\trOAXP2CfOKsajVHvMcqM11qYLZdEL8VjBLmqYTvL0sj/iasHsC2PFI8/uKUqworV\n\tlyaASWopmPJOPNYXs9Hcg+Fz0EEDWTxNMXOd/es+IXHg0r4gxZxTAsDWG38VIp62\n\t6r4hL9l4ZkvusQjCgoMx9FPT6g8=","DKIM-Signature":"v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id\n\t:list-unsubscribe:list-archive:list-post:list-help:sender:date\n\t:from:to:cc:subject:in-reply-to:message-id:references\n\t:mime-version:content-type; s=default; bh=engqrSBugi5mS1dP0Ox1g4\n\tCaViE=; b=DrjvSAMiWJuyrIMHu8Pox7carXzUYX1QLQBYvz4/OY16F2ycNTPM/T\n\tg6Va/fC9i2NxztA5BKydAPHer6V65misvYIxbQBz47MWxbWEif2RKZiE+8ZT8Rld\n\t2crLogf3b5AKvseOsb5681yPxp6Tc3KQ7niNeR202Lxq/JGGhBIyk=","Mailing-List":"contact gcc-patches-help@gcc.gnu.org; run by ezmlm","Precedence":"bulk","List-Id":"<gcc-patches.gcc.gnu.org>","List-Unsubscribe":"<mailto:gcc-patches-unsubscribe-incoming=patchwork.ozlabs.org@gcc.gnu.org>","List-Archive":"<http://gcc.gnu.org/ml/gcc-patches/>","List-Post":"<mailto:gcc-patches@gcc.gnu.org>","List-Help":"<mailto:gcc-patches-help@gcc.gnu.org>","Sender":"gcc-patches-owner@gcc.gnu.org","X-Virus-Found":"No","X-Spam-SWARE-Status":"No, score=-11.9 required=5.0 tests=BAYES_00, GIT_PATCH_2,\n\tGIT_PATCH_3, RP_MATCHES_RCVD,\n\tSPF_PASS autolearn=ham version=3.3.2 spammy=","X-HELO":"mx1.suse.de","Date":"Thu, 31 Aug 2017 16:03:38 +0200 (CEST)","From":"Richard Biener <rguenther@suse.de>","To":"gcc-patches@gcc.gnu.org","cc":"jason@redhat.com","Subject":"Re: [PATCH] Early LTO debug TODO","In-Reply-To":"<alpine.LSU.2.20.1708311511430.14191@zhemvz.fhfr.qr>","Message-ID":"<alpine.LSU.2.20.1708311554120.14191@zhemvz.fhfr.qr>","References":"<alpine.LSU.2.20.1708311511430.14191@zhemvz.fhfr.qr>","User-Agent":"Alpine 2.20 (LSU 67 2015-01-07)","MIME-Version":"1.0","Content-Type":"text/plain; charset=US-ASCII"}},{"id":1765799,"web_url":"http://patchwork.ozlabs.org/comment/1765799/","msgid":"<CADzB+2kJ98qt2WG7ZiRz0raFjdQsavo5x=J71mC60qKqacV=gg@mail.gmail.com>","list_archive_url":null,"date":"2017-09-09T14:00:56","subject":"Re: [PATCH] Early LTO debug TODO","submitter":{"id":4337,"url":"http://patchwork.ozlabs.org/api/people/4337/","name":"Jason Merrill","email":"jason@redhat.com"},"content":"On Thu, Aug 31, 2017 at 4:03 PM, Richard Biener <rguenther@suse.de> wrote:\n> On Thu, 31 Aug 2017, Richard Biener wrote:\n>\n>>\n>> As suspected during review the DECL_ABSTRACT_P handling in\n>> gen_formal_parameter_die is no longer necessary so the following\n>> patch removes it.\n>>\n>> [LTO] bootstrapped on x86_64-unknown-linux-gnu, testing in progress.\n>> The gdb testsuite shows no regression.\n>>\n>> Will apply after testing finished.\n>\n> Ok, so it doesn't work - it regresses for example\n> gcc.dg/debug/dwarf2/inline1.c because we end up annotating the\n> abstract DIE with a location.  This is because in gen_subprogram_die\n> (with decl set as abstract-self and thus generating a concrete\n> instance subroutine die) we call\n>\n>           else if (parm && !POINTER_BOUNDS_P (parm))\n>             {\n>               dw_die_ref parm_die = gen_decl_die (parm, NULL, NULL,\n> subr_die);\n>\n> thus unconditionally pass NULL as origin where gen_formal_parameter_die\n> just has\n>\n>   /* If we have a previously generated DIE, use it, unless this is an\n>      concrete instance (origin != NULL), in which case we need a new\n>      DIE with a corresponding DW_AT_abstract_origin.  */\n>   bool reusing_die;\n>   if (parm_die && origin == NULL)\n>     reusing_die = true;\n>   else\n>     {\n>       parm_die = new_die (DW_TAG_formal_parameter, context_die, node);\n>       reusing_die = false;\n>     }\n>\n> but obviously that logic is flawed with us passing origin as NULL...\n>\n> What saved us here is the check whether the existing param_die has\n> the correct parent, if not we didn't re-use it.  OTOH for die_parent\n> == NULL we have the extra check that would have been dead code.\n>\n> Any hint as to whether we should pass in anything as origin or\n> whether we should keep the existing die_parent logic somehow?\n> (do we ever get a NULL context_die passed?)\n\nThe problem is that we aren't checking decl_ultimate_origin soon\nenough, and thereby setting origin.\n\nTested x86_64-pc-linux-gnu, applying to trunk:\ncommit b7702a2cbca9c50e94053cc125ff93438d377126\nAuthor: Jason Merrill <jason@redhat.com>\nDate:   Sat Sep 9 11:33:14 2017 +0200\n\n            * dwarf2out.c (gen_formal_parameter_die): Remove obsolete hunk.\n    \n            Check ultimate_origin before setting reusing_die.\n\ndiff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c\nindex 651dd0c..cc93db3 100644\n--- a/gcc/dwarf2out.c\n+++ b/gcc/dwarf2out.c\n@@ -21285,30 +21285,15 @@ gen_formal_parameter_die (tree node, tree origin, bool emit_name_p,\n \t\t\t  dw_die_ref context_die)\n {\n   tree node_or_origin = node ? node : origin;\n-  tree ultimate_origin;\n   dw_die_ref parm_die = NULL;\n   \n-  if (TREE_CODE_CLASS (TREE_CODE (node_or_origin)) == tcc_declaration)\n+  if (DECL_P (node_or_origin))\n     {\n       parm_die = lookup_decl_die (node);\n \n-      /* If the contexts differ, we may not be talking about the same\n-\t thing.\n-\t ???  When in LTO the DIE parent is the \"abstract\" copy and the\n-\t context_die is the specification \"copy\".  But this whole block\n-\t should eventually be no longer needed.  */\n-      if (parm_die && parm_die->die_parent != context_die && !in_lto_p)\n-\t{\n-\t  if (!DECL_ABSTRACT_P (node))\n-\t    {\n-\t      /* This can happen when creating an inlined instance, in\n-\t\t which case we need to create a new DIE that will get\n-\t\t annotated with DW_AT_abstract_origin.  */\n-\t      parm_die = NULL;\n-\t    }\n-\t  else\n-\t    gcc_unreachable ();\n-\t}\n+      tree ultimate_origin = decl_ultimate_origin (node_or_origin);\n+      if (node || ultimate_origin)\n+\torigin = ultimate_origin;\n \n       if (parm_die && parm_die->die_parent == NULL)\n \t{\n@@ -21343,10 +21328,6 @@ gen_formal_parameter_die (tree node, tree origin, bool emit_name_p,\n   switch (TREE_CODE_CLASS (TREE_CODE (node_or_origin)))\n     {\n     case tcc_declaration:\n-      ultimate_origin = decl_ultimate_origin (node_or_origin);\n-      if (node || ultimate_origin)\n-\torigin = ultimate_origin;\n-\n       if (reusing_die)\n \tgoto add_location;","headers":{"Return-Path":"<gcc-patches-return-461779-incoming=patchwork.ozlabs.org@gcc.gnu.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":["patchwork-incoming@bilbo.ozlabs.org","mailing list gcc-patches@gcc.gnu.org"],"Authentication-Results":["ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=gcc.gnu.org\n\t(client-ip=209.132.180.131; helo=sourceware.org;\n\tenvelope-from=gcc-patches-return-461779-incoming=patchwork.ozlabs.org@gcc.gnu.org;\n\treceiver=<UNKNOWN>)","ozlabs.org; dkim=pass (1024-bit key;\n\tunprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org\n\theader.b=\"EVQT3Yhc\"; dkim-atps=neutral","sourceware.org; auth=none"],"Received":["from sourceware.org (server1.sourceware.org [209.132.180.131])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xqG7t4Wqcz9sBZ\n\tfor <incoming@patchwork.ozlabs.org>;\n\tSun, 10 Sep 2017 00:01:29 +1000 (AEST)","(qmail 32905 invoked by alias); 9 Sep 2017 14:01:21 -0000","(qmail 32164 invoked by uid 89); 9 Sep 2017 14:01:20 -0000","from mail-io0-f176.google.com (HELO mail-io0-f176.google.com)\n\t(209.85.223.176) by sourceware.org\n\t(qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP;\n\tSat, 09 Sep 2017 14:01:19 +0000","by mail-io0-f176.google.com with SMTP id j141so10493403ioj.4 for\n\t<gcc-patches@gcc.gnu.org>; Sat, 09 Sep 2017 07:01:18 -0700 (PDT)","by 10.107.181.23 with HTTP; Sat, 9 Sep 2017 07:00:56 -0700 (PDT)"],"DomainKey-Signature":"a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id\n\t:list-unsubscribe:list-archive:list-post:list-help:sender\n\t:mime-version:in-reply-to:references:from:date:message-id\n\t:subject:to:cc:content-type; q=dns; s=default; b=hiqLZks2Pj0bJAJ\n\tCGYS1SyU+8F8WC4x++RJpN5/49gL7sRBLlU6PQQBRJH7MgxDEcFao1BoFPn+I0pW\n\tcLOlac+xElFbg8+81CEnG3p6hww+3HrrJm7UtP8xIC+6mATbxDIrjSNW1Hvs1kC+\n\t3ghr/PCH0Ay9NlNOdsFA94PnzLxk=","DKIM-Signature":"v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id\n\t:list-unsubscribe:list-archive:list-post:list-help:sender\n\t:mime-version:in-reply-to:references:from:date:message-id\n\t:subject:to:cc:content-type; s=default; bh=8mlB9hzHVit610Rh5ws4M\n\ti3/8vg=; b=EVQT3YhcuwATO0cmxsJhDoBl++HAxgtXemPt/BfsK6yKpnRyFBazA\n\toJTFxTgyjo89bzq+nEUPVVozCqgaacE8mupHYIK/y7rW8L15haO20uLIuvfFvlYz\n\t3ETE65S/9xDgJWKwZx2tql7nRY1NzJAUffwbcf2TUGV6lmDUn6SSIQ=","Mailing-List":"contact gcc-patches-help@gcc.gnu.org; run by ezmlm","Precedence":"bulk","List-Id":"<gcc-patches.gcc.gnu.org>","List-Unsubscribe":"<mailto:gcc-patches-unsubscribe-incoming=patchwork.ozlabs.org@gcc.gnu.org>","List-Archive":"<http://gcc.gnu.org/ml/gcc-patches/>","List-Post":"<mailto:gcc-patches@gcc.gnu.org>","List-Help":"<mailto:gcc-patches-help@gcc.gnu.org>","Sender":"gcc-patches-owner@gcc.gnu.org","X-Virus-Found":"No","X-Spam-SWARE-Status":"No, score=-25.0 required=5.0 tests=AWL, BAYES_00,\n\tGIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3,\n\tRCVD_IN_DNSWL_NONE,\n\tRCVD_IN_SORBS_SPAM autolearn=ham version=3.3.2 spammy=flawed","X-HELO":"mail-io0-f176.google.com","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net;\n\ts=20161025;\n\th=x-gm-message-state:mime-version:in-reply-to:references:from:date\n\t:message-id:subject:to:cc;\n\tbh=d/CdQa1fSKXVBZKuncftRdRUIxsUs5LkNUD83IaX12E=;\n\tb=M9XOOjonooBiumgenNxsGlLARfnR4Ez5HXrGbi+7S0abMuRl1rrrovZ5MnGd8X/fic\n\tf0PApOqeS4KPcR8izf/yQarvjxmeMbtxPuqHphT9NQdwSqFgCj1op5ya9E4iwy/ZAr9b\n\tSlpu3Fhc/fbfHChhAA3k/NzXlvRCajNL4WeY2E/fbpGmrNjRnW9GcR2uDhMeKkAvl/H4\n\twBrW4+Vx49eqL1Z5r8OHHd6FOs/XNvjdWMfxIay+q3hwaeZtRmlX7Evehcrn4+2/6V6w\n\tccWMrHcIqRd/FZC/AtPfn9xqpk2ppIKGv04pxLJJmV7gtpauG95AeBMhFmCmPFm9LSl1\n\t1dDQ==","X-Gm-Message-State":"AHPjjUgO3cYnkB5GKaWhD9BKRtK+z8lrz9fRAsaJkk3GqbiCtqSEzEDu\tkk9oX54k3gxEPPkWJlEzWnj2gjGIL5ET","X-Google-Smtp-Source":"AOwi7QDKi83GLx3RkzAK9In0sA9zkheb8+o+pKH6vAaOYQmYqU5y9gf6OJ6727WVGMsd7LSfWjqnYvjn/2j9zzW9nVo=","X-Received":"by 10.107.35.193 with SMTP id j184mr5043911ioj.113.1504965677288;\n\tSat, 09 Sep 2017 07:01:17 -0700 (PDT)","MIME-Version":"1.0","In-Reply-To":"<alpine.LSU.2.20.1708311554120.14191@zhemvz.fhfr.qr>","References":"<alpine.LSU.2.20.1708311511430.14191@zhemvz.fhfr.qr>\n\t<alpine.LSU.2.20.1708311554120.14191@zhemvz.fhfr.qr>","From":"Jason Merrill <jason@redhat.com>","Date":"Sat, 9 Sep 2017 16:00:56 +0200","Message-ID":"<CADzB+2kJ98qt2WG7ZiRz0raFjdQsavo5x=J71mC60qKqacV=gg@mail.gmail.com>","Subject":"Re: [PATCH] Early LTO debug TODO","To":"Richard Biener <rguenther@suse.de>","Cc":"gcc-patches List <gcc-patches@gcc.gnu.org>","Content-Type":"multipart/mixed; boundary=\"001a1140f29e98a8850558c2208f\"","X-IsSubscribed":"yes"}},{"id":1765880,"web_url":"http://patchwork.ozlabs.org/comment/1765880/","msgid":"<CADzB+2mKt8D8zMZHC6DkKpQVz4mJ1gJH3afProDhMm4h5PdwiQ@mail.gmail.com>","list_archive_url":null,"date":"2017-09-09T22:23:03","subject":"Re: [PATCH] Early LTO debug TODO","submitter":{"id":4337,"url":"http://patchwork.ozlabs.org/api/people/4337/","name":"Jason Merrill","email":"jason@redhat.com"},"content":"On Sat, Sep 9, 2017 at 4:00 PM, Jason Merrill <jason@redhat.com> wrote:\n> On Thu, Aug 31, 2017 at 4:03 PM, Richard Biener <rguenther@suse.de> wrote:\n>> On Thu, 31 Aug 2017, Richard Biener wrote:\n>>\n>>>\n>>> As suspected during review the DECL_ABSTRACT_P handling in\n>>> gen_formal_parameter_die is no longer necessary so the following\n>>> patch removes it.\n>>>\n>>> [LTO] bootstrapped on x86_64-unknown-linux-gnu, testing in progress.\n>>> The gdb testsuite shows no regression.\n>>>\n>>> Will apply after testing finished.\n>>\n>> Ok, so it doesn't work - it regresses for example\n>> gcc.dg/debug/dwarf2/inline1.c because we end up annotating the\n>> abstract DIE with a location.  This is because in gen_subprogram_die\n>> (with decl set as abstract-self and thus generating a concrete\n>> instance subroutine die) we call\n>>\n>>           else if (parm && !POINTER_BOUNDS_P (parm))\n>>             {\n>>               dw_die_ref parm_die = gen_decl_die (parm, NULL, NULL,\n>> subr_die);\n>>\n>> thus unconditionally pass NULL as origin where gen_formal_parameter_die\n>> just has\n>>\n>>   /* If we have a previously generated DIE, use it, unless this is an\n>>      concrete instance (origin != NULL), in which case we need a new\n>>      DIE with a corresponding DW_AT_abstract_origin.  */\n>>   bool reusing_die;\n>>   if (parm_die && origin == NULL)\n>>     reusing_die = true;\n>>   else\n>>     {\n>>       parm_die = new_die (DW_TAG_formal_parameter, context_die, node);\n>>       reusing_die = false;\n>>     }\n>>\n>> but obviously that logic is flawed with us passing origin as NULL...\n>>\n>> What saved us here is the check whether the existing param_die has\n>> the correct parent, if not we didn't re-use it.  OTOH for die_parent\n>> == NULL we have the extra check that would have been dead code.\n>>\n>> Any hint as to whether we should pass in anything as origin or\n>> whether we should keep the existing die_parent logic somehow?\n>> (do we ever get a NULL context_die passed?)\n>\n> The problem is that we aren't checking decl_ultimate_origin soon\n> enough, and thereby setting origin.\n>\n> Tested x86_64-pc-linux-gnu, applying to trunk:\n\n...and reverting, as it caused a bunch of GDB regressions.\n\n> FAIL: gdb.cp/anon-struct.exp: print type of t3::~t3\n> FAIL: gdb.cp/anon-struct.exp: print type of t::t\n> FAIL: gdb.cp/anon-struct.exp: print type of X::t2::t2\n> FAIL: gdb.cp/cpexprs.exp: print base1::base1(int)\n> FAIL: gdb.cp/cpexprs.exp: print base1::base1(void)\n> FAIL: gdb.cp/cpexprs.exp: print base2::base2\n> FAIL: gdb.cp/cpexprs.exp: print base::~base\n> FAIL: gdb.cp/cpexprs.exp: print base::base(int)\n> FAIL: gdb.cp/cpexprs.exp: print base::base(void)\n> FAIL: gdb.cp/cpexprs.exp: print derived::derived\n> FAIL: gdb.cp/cpexprs.exp: print policy1::policy\n> FAIL: gdb.cp/cpexprs.exp: print policy2::policy\n> FAIL: gdb.cp/cpexprs.exp: print policy3::policy\n> FAIL: gdb.cp/cpexprs.exp: print policy4::policy\n> FAIL: gdb.cp/cpexprs.exp: print policyd1::policyd\n> FAIL: gdb.cp/cpexprs.exp: print policyd1::~policyd\n> FAIL: gdb.cp/cpexprs.exp: print policyd2::policyd\n> FAIL: gdb.cp/cpexprs.exp: print policyd2::~policyd\n> FAIL: gdb.cp/cpexprs.exp: print policyd3::policyd\n> FAIL: gdb.cp/cpexprs.exp: print policyd3::~policyd\n> FAIL: gdb.cp/cpexprs.exp: print policyd4::policyd\n> FAIL: gdb.cp/cpexprs.exp: print policyd4::~policyd\n> FAIL: gdb.cp/cpexprs.exp: print policyd5::policyd\n> FAIL: gdb.cp/cpexprs.exp: print policyd5::~policyd\n> FAIL: gdb.cp/cpexprs.exp: print policyd<base, operation_1<base> >::policyd\n> FAIL: gdb.cp/cpexprs.exp: print policyd<base, operation_1<base> >::~policyd\n> FAIL: gdb.cp/cpexprs.exp: print policyd<char, operation_1<char> >::policyd\n> FAIL: gdb.cp/cpexprs.exp: print policyd<char, operation_1<char> >::~policyd\n> FAIL: gdb.cp/cpexprs.exp: print policyd<int, operation_1<int> >::policyd\n> FAIL: gdb.cp/cpexprs.exp: print policyd<int, operation_1<int> >::~policyd\n> FAIL: gdb.cp/cpexprs.exp: print policyd<long, operation_1<long> >::policyd\n> FAIL: gdb.cp/cpexprs.exp: print policyd<long, operation_1<long> >::~policyd\n> FAIL: gdb.cp/cpexprs.exp: print policyd<tclass<int>, operation_1<tclass<int> > >::policyd\n> FAIL: gdb.cp/cpexprs.exp: print policyd<tclass<int>, operation_1<tclass<int> > >::~policyd\n\nJason","headers":{"Return-Path":"<gcc-patches-return-461784-incoming=patchwork.ozlabs.org@gcc.gnu.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":["patchwork-incoming@bilbo.ozlabs.org","mailing list gcc-patches@gcc.gnu.org"],"Authentication-Results":["ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=gcc.gnu.org\n\t(client-ip=209.132.180.131; helo=sourceware.org;\n\tenvelope-from=gcc-patches-return-461784-incoming=patchwork.ozlabs.org@gcc.gnu.org;\n\treceiver=<UNKNOWN>)","ozlabs.org; dkim=pass (1024-bit key;\n\tunprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org\n\theader.b=\"EeWnbO33\"; dkim-atps=neutral","sourceware.org; auth=none"],"Received":["from sourceware.org (server1.sourceware.org [209.132.180.131])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xqTHC72QWz9sQl\n\tfor <incoming@patchwork.ozlabs.org>;\n\tSun, 10 Sep 2017 08:23:34 +1000 (AEST)","(qmail 54336 invoked by alias); 9 Sep 2017 22:23:27 -0000","(qmail 54323 invoked by uid 89); 9 Sep 2017 22:23:26 -0000","from mail-it0-f53.google.com (HELO mail-it0-f53.google.com)\n\t(209.85.214.53) by sourceware.org\n\t(qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP;\n\tSat, 09 Sep 2017 22:23:25 +0000","by mail-it0-f53.google.com with SMTP id o200so10099233itg.0 for\n\t<gcc-patches@gcc.gnu.org>; Sat, 09 Sep 2017 15:23:25 -0700 (PDT)","by 10.107.181.23 with HTTP; Sat, 9 Sep 2017 15:23:03 -0700 (PDT)"],"DomainKey-Signature":"a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id\n\t:list-unsubscribe:list-archive:list-post:list-help:sender\n\t:mime-version:in-reply-to:references:from:date:message-id\n\t:subject:to:cc:content-type; q=dns; s=default; b=fo3KSDhoI3VJy6T\n\tiOKbv+Aj9hDMe3hQFgD2ops28Gbp3595TRS/v+LlJy70EJc3Ewh+ilZ8qFa4qyBq\n\tJchHDMhC+clGz/8kVtBs3zTMAkBrByxE0aw8U+0ByXXZPokxTWRSigaKhyYU5caQ\n\tXfyOB5yedkJpC0d73ImvFn5dB5xk=","DKIM-Signature":"v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id\n\t:list-unsubscribe:list-archive:list-post:list-help:sender\n\t:mime-version:in-reply-to:references:from:date:message-id\n\t:subject:to:cc:content-type; s=default; bh=u5jVy9kvcveeB8P9ngQ5V\n\tbz8jWY=; b=EeWnbO33PtCsJCbbv7KjK9sObLk/+wPnToYSegOfdeZ5E2eZNerC9\n\tyQPinl1lCJUVJeHiN4Cgu0pgMueTI0CBAa6OvbxTqcNbXV63fs1tjWZLLh5gVSDv\n\tEpqcX1+WprznbXY2eIFLYssXMn/KpnvoSdC7wwxwG9rYDCRv+JiShY=","Mailing-List":"contact gcc-patches-help@gcc.gnu.org; run by ezmlm","Precedence":"bulk","List-Id":"<gcc-patches.gcc.gnu.org>","List-Unsubscribe":"<mailto:gcc-patches-unsubscribe-incoming=patchwork.ozlabs.org@gcc.gnu.org>","List-Archive":"<http://gcc.gnu.org/ml/gcc-patches/>","List-Post":"<mailto:gcc-patches@gcc.gnu.org>","List-Help":"<mailto:gcc-patches-help@gcc.gnu.org>","Sender":"gcc-patches-owner@gcc.gnu.org","X-Virus-Found":"No","X-Spam-SWARE-Status":"No, score=-2.0 required=5.0 tests=AWL, BAYES_00,\n\tKAM_LAZY_DOMAIN_SECURITY, RCVD_IN_DNSWL_LOW,\n\tRCVD_IN_SORBS_SPAM autolearn=no version=3.3.2 spammy=","X-HELO":"mail-it0-f53.google.com","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net;\n\ts=20161025;\n\th=x-gm-message-state:mime-version:in-reply-to:references:from:date\n\t:message-id:subject:to:cc;\n\tbh=kbQAfkRPhtypWILBfsz3QZYPU1jxtVuOG+DJk6+m430=;\n\tb=DOLR00pW+T/k2fIcdFWksk7bS0Mmh/6k0RUzrZWYSjOS9fuzBBISf/JXH6lti0GYz1\n\tUK1p5yVuhDaSdfD/1EU/hu+VW/+CvKlhMhH3oKftNvOp5l9Ru+gVvbmIszv14+0szFXi\n\tS8YaRcQilvwhDKxHXpfJuw2XitkYnhKOMuYqowKG8d+I6FgM22UdiXmykVka3Ia45rQ6\n\tuF7n8q0iYkuZTgjkmsyn2aCtv+cLadr/Ry6fT1vxrA48nKJj4rwpSCsSODbWNG6oDYoI\n\tZome6Mdl3V+pCl7q3EiBjVGoRiz93XDXIC+fotIQAXF1J1mwBWBzDbG9PZKml/P6oecj\n\tu2ug==","X-Gm-Message-State":"AHPjjUjfhMly2OgJIutVtXDYtMhjqWj4Nd0R/YASWgkdSygr878hnwtf\t1ObTazuBaxj86nbJYal1uQ7X9/gr3F1A","X-Google-Smtp-Source":"ADKCNb5ssjB3/+CqhDbbA4ZT/jzXQ12Qckm29ht2v4ivU0pA+oxgawWNapNs04H8IzPibWo5wvTBso7aW2ebnDsL6k4=","X-Received":"by 10.36.201.196 with SMTP id h187mr6422184itg.42.1504995803563;\n\tSat, 09 Sep 2017 15:23:23 -0700 (PDT)","MIME-Version":"1.0","In-Reply-To":"<CADzB+2kJ98qt2WG7ZiRz0raFjdQsavo5x=J71mC60qKqacV=gg@mail.gmail.com>","References":"<alpine.LSU.2.20.1708311511430.14191@zhemvz.fhfr.qr>\n\t<alpine.LSU.2.20.1708311554120.14191@zhemvz.fhfr.qr>\n\t<CADzB+2kJ98qt2WG7ZiRz0raFjdQsavo5x=J71mC60qKqacV=gg@mail.gmail.com>","From":"Jason Merrill <jason@redhat.com>","Date":"Sun, 10 Sep 2017 00:23:03 +0200","Message-ID":"<CADzB+2mKt8D8zMZHC6DkKpQVz4mJ1gJH3afProDhMm4h5PdwiQ@mail.gmail.com>","Subject":"Re: [PATCH] Early LTO debug TODO","To":"Richard Biener <rguenther@suse.de>","Cc":"gcc-patches List <gcc-patches@gcc.gnu.org>","Content-Type":"text/plain; charset=\"UTF-8\"","X-IsSubscribed":"yes"}}]