{"id":807044,"url":"http://patchwork.ozlabs.org/api/patches/807044/?format=json","web_url":"http://patchwork.ozlabs.org/project/gcc/patch/alpine.LSU.2.20.1708291232400.14191@zhemvz.fhfr.qr/","project":{"id":17,"url":"http://patchwork.ozlabs.org/api/projects/17/?format=json","name":"GNU Compiler Collection","link_name":"gcc","list_id":"gcc-patches.gcc.gnu.org","list_email":"gcc-patches@gcc.gnu.org","web_url":null,"scm_url":null,"webscm_url":null,"list_archive_url":"","list_archive_url_format":"","commit_url_format":""},"msgid":"<alpine.LSU.2.20.1708291232400.14191@zhemvz.fhfr.qr>","list_archive_url":null,"date":"2017-08-29T10:35:14","name":"Fix PR82011, early LTO debug fallout","commit_ref":null,"pull_url":null,"state":"new","archived":false,"hash":"25b821cacaed6a3ba2171f69d2d5193d75a33a8f","submitter":{"id":4338,"url":"http://patchwork.ozlabs.org/api/people/4338/?format=json","name":"Richard Biener","email":"rguenther@suse.de"},"delegate":null,"mbox":"http://patchwork.ozlabs.org/project/gcc/patch/alpine.LSU.2.20.1708291232400.14191@zhemvz.fhfr.qr/mbox/","series":[{"id":349,"url":"http://patchwork.ozlabs.org/api/series/349/?format=json","web_url":"http://patchwork.ozlabs.org/project/gcc/list/?series=349","date":"2017-08-29T10:35:14","name":"Fix PR82011, early LTO debug fallout","version":1,"mbox":"http://patchwork.ozlabs.org/series/349/mbox/"}],"comments":"http://patchwork.ozlabs.org/api/patches/807044/comments/","check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/807044/checks/","tags":{},"related":[],"headers":{"Return-Path":"<gcc-patches-return-461073-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-461073-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=\"sIF1TXbO\"; 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 3xhQjf1Rxqz9t2x\n\tfor <incoming@patchwork.ozlabs.org>;\n\tTue, 29 Aug 2017 21:03:32 +1000 (AEST)","(qmail 26200 invoked by alias); 29 Aug 2017 10:35:28 -0000","(qmail 26182 invoked by uid 89); 29 Aug 2017 10:35:27 -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\tTue, 29 Aug 2017 10:35:17 +0000","from relay2.suse.de (charybdis-ext.suse.de [195.135.220.254])\tby\n\tmx1.suse.de (Postfix) with ESMTP id E9530AD78\tfor\n\t<gcc-patches@gcc.gnu.org>; Tue, 29 Aug 2017 10:35:14 +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:subject:message-id:mime-version:content-type; q=dns; s=\n\tdefault; b=niFwo8FrRmUOXzjQN2KeIZ5rQIem8Qw7JcBCGSGS3BNLbxi9GjmvJ\n\tRGe9qnizJFFs34ESTD9jrqZym/BZhEfR/VL1bloVtZi+CETj/xYMPaPqBth5NwId\n\t6sRi7rC0CIZZfJNLNsyg7KrojbuTIyt8BFL2L4u+F7fHa9REUXXcX4=","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:subject:message-id:mime-version:content-type; s=\n\tdefault; bh=bGwXJxsRGdGdwYbMEhUsR7x9/7k=; b=sIF1TXbO9f32QHFHM1R3\n\txleYqKcqgRfF7ETOSp8Wt8Yo4FD0mC5ZlqxnWRGTkrBiP1Vl1s96ri37td6mY6lC\n\t508QLU9AIs7QunJQLJjTjx1XxE7FaQ/MCYvaJ+KJ4ql7wmESPSo8tdshhfBVlGpT\n\tSvsLiYss4QKm1GJTQL5yzsg=","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=hoped","X-HELO":"mx1.suse.de","Date":"Tue, 29 Aug 2017 12:35:14 +0200 (CEST)","From":"Richard Biener <rguenther@suse.de>","To":"gcc-patches@gcc.gnu.org","Subject":"[PATCH] Fix PR82011, early LTO debug fallout","Message-ID":"<alpine.LSU.2.20.1708291232400.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"},"content":"The following avoids adding DW_AT_inline attributes twice on which\ndsymutil complains.  The duplicate attribute is caused by stray\ncode I left in (I guess I hoped nothing ends up DECL_ABSTRACT_P ...).\nThus the following patch removes it -- DW_AT_inline is solely set\nby dwarf2out_abstract_function now.\n\nBootstrapped on x86_64-unknown-linux-gnu, testing in progress.  The\ngdb testsuite shows no regression.\n\nWill commit once testing finished.\n\nNote the assert is deliberately restricted to DW_AT_inline for now\ngiven enabling it unconditionally fires left and right ... :/\n(sth to fix, but only as followups)\n\nRichard.\n\n2017-08-29  Richard Biener  <rguenther@suse.de>\n\n\t* dwarf2out.c (add_dwarf_attr): When checking is enabled verify\n\twe do not add a DW_AT_inline attribute twice.\n\t(gen_subprogram_die): Remove code setting DW_AT_inline on\n\tDECL_ABSTRACT_P nodes.","diff":"Index: gcc/dwarf2out.c\n===================================================================\n--- gcc/dwarf2out.c\t(revision 251401)\n+++ gcc/dwarf2out.c\t(working copy)\n@@ -4122,6 +4122,16 @@ add_dwarf_attr (dw_die_ref die, dw_attr_\n   if (die == NULL)\n     return;\n \n+  if (flag_checking)\n+    {\n+      /* Check we do not add duplicate attrs.  Can't use get_AT here\n+         because that recurses to the specification/abstract origin DIE.  */\n+      dw_attr_node *a;\n+      unsigned ix;\n+      FOR_EACH_VEC_SAFE_ELT (die->die_attr, ix, a)\n+\tgcc_assert (a->dw_attr != attr->dw_attr || a->dw_attr != DW_AT_inline);\n+    }\n+\n   vec_safe_reserve (die->die_attr, 1);\n   vec_safe_push (die->die_attr, *attr);\n }\n@@ -22082,28 +22092,6 @@ gen_subprogram_die (tree decl, dw_die_re\n \t    add_AT_flag (subr_die, DW_AT_rvalue_reference, 1);\n \t}\n     }\n-  /* Tag abstract instances with DW_AT_inline.  */\n-  else if (DECL_ABSTRACT_P (decl))\n-    {\n-      if (DECL_DECLARED_INLINE_P (decl))\n-\t{\n-\t  if (cgraph_function_possibly_inlined_p (decl))\n-\t    add_AT_unsigned (subr_die, DW_AT_inline, DW_INL_declared_inlined);\n-\t  else\n-\t    add_AT_unsigned (subr_die, DW_AT_inline, DW_INL_declared_not_inlined);\n-\t}\n-      else\n-\t{\n-\t  if (cgraph_function_possibly_inlined_p (decl))\n-\t    add_AT_unsigned (subr_die, DW_AT_inline, DW_INL_inlined);\n-\t  else\n-\t    add_AT_unsigned (subr_die, DW_AT_inline, DW_INL_not_inlined);\n-\t}\n-\n-      if (DECL_DECLARED_INLINE_P (decl)\n-\t  && lookup_attribute (\"artificial\", DECL_ATTRIBUTES (decl)))\n-\tadd_AT_flag (subr_die, DW_AT_artificial, 1);\n-    }\n   /* For non DECL_EXTERNALs, if range information is available, fill\n      the DIE with it.  */\n   else if (!DECL_EXTERNAL (decl) && !early_dwarf)\n","prefixes":[]}