Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/809057/?format=api
{ "id": 809057, "url": "http://patchwork.ozlabs.org/api/patches/809057/?format=api", "web_url": "http://patchwork.ozlabs.org/project/gcc/patch/4078981.6jQ9KEkrUD@polaris/", "project": { "id": 17, "url": "http://patchwork.ozlabs.org/api/projects/17/?format=api", "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": "<4078981.6jQ9KEkrUD@polaris>", "list_archive_url": null, "date": "2017-09-02T11:01:11", "name": "[C++] Fix PR bootstrap/81926", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "af74a47554d313f8a792918a233af5f007cdb59b", "submitter": { "id": 4365, "url": "http://patchwork.ozlabs.org/api/people/4365/?format=api", "name": "Eric Botcazou", "email": "ebotcazou@adacore.com" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/gcc/patch/4078981.6jQ9KEkrUD@polaris/mbox/", "series": [ { "id": 1146, "url": "http://patchwork.ozlabs.org/api/series/1146/?format=api", "web_url": "http://patchwork.ozlabs.org/project/gcc/list/?series=1146", "date": "2017-09-02T11:01:11", "name": "[C++] Fix PR bootstrap/81926", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/1146/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/809057/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/809057/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<gcc-patches-return-461339-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-461339-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=\"xByZIuLg\"; 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 3xktTR3WcDz9ryv\n\tfor <incoming@patchwork.ozlabs.org>;\n\tSat, 2 Sep 2017 21:01:29 +1000 (AEST)", "(qmail 9517 invoked by alias); 2 Sep 2017 11:01:22 -0000", "(qmail 9505 invoked by uid 89); 2 Sep 2017 11:01:21 -0000", "from mel.act-europe.fr (HELO smtp.eu.adacore.com) (194.98.77.210)\n\tby sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with\n\tESMTP; Sat, 02 Sep 2017 11:01:15 +0000", "from localhost (localhost [127.0.0.1])\tby\n\tfiltered-smtp.eu.adacore.com (Postfix) with ESMTP id\n\t5D9AC82272\tfor <gcc-patches@gcc.gnu.org>;\n\tSat, 2 Sep 2017 13:01:12 +0200 (CEST)", "from smtp.eu.adacore.com ([127.0.0.1])\tby localhost\n\t(smtp.eu.adacore.com [127.0.0.1]) (amavisd-new, port\n\t10024)\twith ESMTP id IryuAp5mLSe5 for <gcc-patches@gcc.gnu.org>;\n\tSat, 2 Sep 2017 13:01:12 +0200 (CEST)", "from polaris.localnet (bon31-6-88-161-99-133.fbx.proxad.net\n\t[88.161.99.133])\t(using TLSv1.2 with cipher\n\tECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))\t(No client\n\tcertificate requested)\tby smtp.eu.adacore.com (Postfix) with\n\tESMTPSA id 2EDD982267\tfor <gcc-patches@gcc.gnu.org>;\n\tSat, 2 Sep 2017 13:01:12 +0200 (CEST)" ], "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:from\n\t:to:subject:date:message-id:mime-version:content-type\n\t:content-transfer-encoding; q=dns; s=default; b=iv12f067QUxigUeL\n\tBYL99M4kOM2HZapBjyi6BFCrHyNr84AYRsn496ojvr4B5ClCsfPtXqciPyseoIzl\n\tsNFF9xUZ0TRsZP3cbPD63Qk03So06YlKeTh6k7Lqy+vSxMbssn3MHG+nIzUw/vaR\n\t9gX6Y+sAnPh/dhZ6X2Noi993pmA=", "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:from\n\t:to:subject:date:message-id:mime-version:content-type\n\t:content-transfer-encoding; s=default; bh=2Ft957OC8TJA9PG+9DTG6/\n\tq/OXQ=; b=xByZIuLgnuYPMDQvIE9MSCxrQIWd2vfx+57x09Zx9u/P5etipeUe6A\n\tkWDdCE38IxepHz6glSFHi+3GbUo7g9omw7InjE/GDdfFEsIaFlgG9XrGgrp8i7Mz\n\trUPYoiUKMFbdW5tI806WPF5dYQfx+dPeIpERdJjXlKXzXEL4jMdjM=", "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=-10.2 required=5.0 tests=AWL, BAYES_00,\n\tGIT_PATCH_2, GIT_PATCH_3, KAM_ASCII_DIVIDERS,\n\tRCVD_IN_DNSWL_NONE,\n\tSPF_PASS autolearn=ham version=3.3.2 spammy=sk:ebotcaz,\n\tU*ebotcazou", "X-HELO": "smtp.eu.adacore.com", "From": "Eric Botcazou <ebotcazou@adacore.com>", "To": "gcc-patches@gcc.gnu.org", "Subject": "[C++] Fix PR bootstrap/81926", "Date": "Sat, 02 Sep 2017 13:01:11 +0200", "Message-ID": "<4078981.6jQ9KEkrUD@polaris>", "User-Agent": "KMail/4.14.10 (Linux/3.16.7-53-desktop; KDE/4.14.9; x86_64; ; )", "MIME-Version": "1.0", "Content-Type": "multipart/mixed; boundary=\"nextPart33432153.RF2itzCG3V\"", "Content-Transfer-Encoding": "7Bit" }, "content": "Hi,\n\nthis is the bootstrap failure reported for the 7 branch on SPARC64/Solaris:\n\nComparing stages 2 and 3\nBootstrap comparison failure!\ngcc/go/parse.o differs\nmake[2]: *** [compare] Error 1\n\nOn Solaris, the bootstrap is usually an old-style bootstrap, meaning that the \ndebug info is generated during stage2 & stage3 so the comparison also involves \nthe debug info, unlike on Linux. This can be emulated on Linux by configuring \n--with-build-config=no and indeed you get the comparison failure there too:\n\nTarget: x86_64-suse-linux\nConfigured with: /home/eric/svn/gcc-7.2.0/configure --build=x86_64-suse-linux \n--prefix=/home/eric/install/gcc-7.2.0 --enable-languages=c,c++,go --enable-\n__cxa_atexit --disable-nls --with-build-config=no\nThread model: posix\ngcc version 7.2.0 (GCC) \n\nmake[3]: Leaving directory '/home/eric/build/gcc-7.2.0'\nComparing stages 2 and 3\nBootstrap comparison failure!\ngcc/go/parse.o differs\nMakefile:24421: recipe for target 'compare' failed\nmake[2]: *** [compare] Error 1\n\nThe difference is:\n\n 35 .debug_info 0016367a 0000000000000000 0000000000000000 0001faf8 2**0\n CONTENTS, RELOC, READONLY, DEBUGGING\n\n 35 .debug_info 00163670 0000000000000000 0000000000000000 0001faf8 2**0\n CONTENTS, RELOC, READONLY, DEBUGGING\n\n \t.byte\t0\t! end of children of DIE 0x161dbc\n \t.byte\t0\t! end of children of DIE 0x161d9c\n \t.byte\t0\t! end of children of DIE 0x161d5b\n-\t.byte\t0xf2,0x1\t! uleb128 0xf2; (DIE (0x161dd2) \nDW_TAG_ptr_to_member_type)\n-\t.uaword\t0x10445d\t! DW_AT_containing_type\n-\t.uaword\t0x14806e\t! DW_AT_type\n-\t.byte\t0xa5,0x1\t! uleb128 0xa5; (DIE (0x161ddc) \nDW_TAG_subprogram)\n+\t.byte\t0xa5,0x1\t! uleb128 0xa5; (DIE (0x161dd2) \nDW_TAG_subprogram)\n \t.uaword\t0x146733\t! DW_AT_abstract_origin\n\nIt's a garbage collection issue similar to\n https://gcc.gnu.org/ml/gcc-patches/2016-10/msg00541.html\nbut for build_offset_type instead of build_complex_type.\n\nIt's called from the get_debug_type langhook in C++:\n\ntree\ncp_get_debug_type (const_tree type)\n{\n if (TYPE_PTRMEMFUNC_P (type) && !typedef_variant_p (type))\n return build_offset_type (TYPE_PTRMEMFUNC_OBJECT_TYPE (type),\n\t\t\t TREE_TYPE (TYPE_PTRMEMFUNC_FN_TYPE (type)));\n\n return NULL_TREE;\n}\n\nSince the OFFSET_TYPEs created there are not attached to any GC root, they are \nswept by every collection, meaning that the contents of the debug info depends \non the actual collection points.\n\nThe proposed fix is to build OFFSET_TYPEs manually instead. As witnessed by \nthe change to g++.dg/debug/dwarf2/ref-3.C, this generates more DIEs in the \ndebug info, but DW_TAG_ptr_to_member_type DIEs only contain 10 bytes.\n\nBootstrapped on x86-64/Linux & SPARC64/Solaris, OK for mainline and 7 branch?\n\n\n2017-09-02 Eric Botcazou <ebotcazou@adacore.com>\n\n\tPR bootstrap/81926\n\t* cp-objcp-common.c: Include stor-layout.h.\n\t(cp_get_debug_type): Build OFFSET_TYPEs manually.\n\n\n2017-09-02 Eric Botcazou <ebotcazou@adacore.com>\n\n\t* g++.dg/debug/dwarf2/ref-3.C: Adjust DW_TAG_ptr_to_member_type count.", "diff": "Index: cp/cp-objcp-common.c\n===================================================================\n--- cp/cp-objcp-common.c\t(revision 251553)\n+++ cp/cp-objcp-common.c\t(working copy)\n@@ -23,6 +23,7 @@ along with GCC; see the file COPYING3.\n #include \"coretypes.h\"\n #include \"cp-tree.h\"\n #include \"cp-objcp-common.h\"\n+#include \"stor-layout.h\"\n #include \"dwarf2.h\"\n \n /* Special routine to get the alias set for C++. */\n@@ -138,8 +139,20 @@ tree\n cp_get_debug_type (const_tree type)\n {\n if (TYPE_PTRMEMFUNC_P (type) && !typedef_variant_p (type))\n- return build_offset_type (TYPE_PTRMEMFUNC_OBJECT_TYPE (type),\n-\t\t\t TREE_TYPE (TYPE_PTRMEMFUNC_FN_TYPE (type)));\n+ {\n+ /* We cannot call build_offset_type here because the function uses the\n+\t type canonicalization hashtable, which is GC-ed, so its behavior\n+\t depends on the actual collection points. Since we are building these\n+\t types on the fly for the debug info, they are not attached to any\n+\t GC root and will always be swept, so we would make the contents of\n+\t the debug info depend on the collection points. */\n+ tree t = make_node (OFFSET_TYPE);\n+ TYPE_OFFSET_BASETYPE (t)\n+\t= TYPE_MAIN_VARIANT (TYPE_PTRMEMFUNC_OBJECT_TYPE (type));\n+ TREE_TYPE (t) = TREE_TYPE (TYPE_PTRMEMFUNC_FN_TYPE (type));\n+ layout_type (t);\n+ return t;\n+ }\n \n return NULL_TREE;\n }\nIndex: testsuite/g++.dg/debug/dwarf2/ref-3.C\n===================================================================\n--- testsuite/g++.dg/debug/dwarf2/ref-3.C\t(revision 251553)\n+++ testsuite/g++.dg/debug/dwarf2/ref-3.C\t(working copy)\n@@ -3,7 +3,7 @@\n // { dg-final { scan-assembler-times \" DW_AT_reference\" 5 { xfail *-*-aix* } } }\n // { dg-final { scan-assembler-times \" DW_AT_rvalue_reference\" 5 { xfail *-*-aix* } } }\n // { dg-final { scan-assembler-times \"DIE \\\\(\\[^\\n\\]*\\\\) DW_TAG_subroutine_type\" 6 { xfail *-*-aix* } } }\n-// { dg-final { scan-assembler-times \"DIE \\\\(\\[^\\n\\]*\\\\) DW_TAG_ptr_to_member_type\" 7 { xfail *-*-aix* } } }\n+// { dg-final { scan-assembler-times \"DIE \\\\(\\[^\\n\\]*\\\\) DW_TAG_ptr_to_member_type\" 13 { xfail *-*-aix* } } }\n // { dg-final { scan-assembler-times \" DW_AT_use_location\" 1 { xfail *-*-aix* } } }\n \n struct S\n", "prefixes": [ "C++" ] }