Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/1.2/patches/810290/?format=api
{ "id": 810290, "url": "http://patchwork.ozlabs.org/api/1.2/patches/810290/?format=api", "web_url": "http://patchwork.ozlabs.org/project/gcc/patch/20170905211653.GH2323@tucnak/", "project": { "id": 17, "url": "http://patchwork.ozlabs.org/api/1.2/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": "<20170905211653.GH2323@tucnak>", "list_archive_url": null, "date": "2017-09-05T21:16:53", "name": "Fix ICE in categorize_decl_for_section with TLS decl (PR middle-end/82095)", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "d52f49516e23992cda7d2bda0d75269dbc5bd24a", "submitter": { "id": 671, "url": "http://patchwork.ozlabs.org/api/1.2/people/671/?format=api", "name": "Jakub Jelinek", "email": "jakub@redhat.com" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/gcc/patch/20170905211653.GH2323@tucnak/mbox/", "series": [ { "id": 1651, "url": "http://patchwork.ozlabs.org/api/1.2/series/1651/?format=api", "web_url": "http://patchwork.ozlabs.org/project/gcc/list/?series=1651", "date": "2017-09-05T21:16:53", "name": "Fix ICE in categorize_decl_for_section with TLS decl (PR middle-end/82095)", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/1651/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/810290/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/810290/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<gcc-patches-return-461540-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-461540-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=\"d0iK/WGH\"; dkim-atps=neutral", "sourceware.org; auth=none", "ext-mx07.extmail.prod.ext.phx2.redhat.com;\n\tdmarc=none (p=none dis=none) header.from=redhat.com", "ext-mx07.extmail.prod.ext.phx2.redhat.com;\n\tspf=fail smtp.mailfrom=jakub@redhat.com" ], "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 3xn00X0mV9z9sNq\n\tfor <incoming@patchwork.ozlabs.org>;\n\tWed, 6 Sep 2017 07:17:14 +1000 (AEST)", "(qmail 123923 invoked by alias); 5 Sep 2017 21:17:05 -0000", "(qmail 123621 invoked by uid 89); 5 Sep 2017 21:17:05 -0000", "from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by\n\tsourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP;\n\tTue, 05 Sep 2017 21:17:00 +0000", "from smtp.corp.redhat.com\n\t(int-mx02.intmail.prod.int.phx2.redhat.com\n\t[10.5.11.12])\t(using TLSv1.2 with cipher AECDH-AES256-SHA\n\t(256/256 bits))\t(No client certificate requested)\tby\n\tmx1.redhat.com (Postfix) with ESMTPS id 2B592C01FA91;\n\tTue, 5 Sep 2017 21:16:59 +0000 (UTC)", "from tucnak.zalov.cz (ovpn-116-33.ams2.redhat.com\n\t[10.36.116.33])\tby smtp.corp.redhat.com (Postfix) with ESMTPS\n\tid C30CD60F80; Tue, 5 Sep 2017 21:16:58 +0000 (UTC)", "from tucnak.zalov.cz (localhost [127.0.0.1])\tby tucnak.zalov.cz\n\t(8.15.2/8.15.2) with ESMTP id v85LGuGZ002548;\n\tTue, 5 Sep 2017 23:16:56 +0200", "(from jakub@localhost)\tby tucnak.zalov.cz (8.15.2/8.15.2/Submit)\n\tid v85LGrvh002546; Tue, 5 Sep 2017 23:16:53 +0200" ], "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:message-id:reply-to:mime-version\n\t:content-type; q=dns; s=default; b=KdijjokusO3iDLJDQrSBf/SKcJk9E\n\twOMjC6/GHehHN5I6zbqf9w2Dj5NadMaLthZbf7doJOlYMurU+wWLwLYMWl8/cGB8\n\tx1917o2fHFaczSv89nwlzMZZU8hJUlAdk8ugDo17/ToA4rponJFK0AFe0aQrlCe2\n\tymDvLHH+mH2hbw=", "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:message-id:reply-to:mime-version\n\t:content-type; s=default; bh=BzhOnRy0PVCPx+rhiRmB4aKLp/A=; b=d0i\n\tK/WGHD/wMzWZsML5V/6pirJJpri5kwniU6K0a+VSqdLSQKFX9AdBEJVjC1jCxLgt\n\tDW8Ag5lFQbGJM9KiIByezIn3znMgh2jU99CUN8De74MdC1tG86B7jnQlrTx+wP0Z\n\t5tnYHeJDTHU4BltF6cwk/eqH3am+oR01Uof/7vu8=", "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_HELO_PASS autolearn=ham version=3.3.2 spammy=", "X-HELO": "mx1.redhat.com", "DMARC-Filter": "OpenDMARC Filter v1.3.2 mx1.redhat.com 2B592C01FA91", "Date": "Tue, 5 Sep 2017 23:16:53 +0200", "From": "Jakub Jelinek <jakub@redhat.com>", "To": "Richard Biener <rguenther@suse.de>, Jeff Law <law@redhat.com>", "Cc": "gcc-patches@gcc.gnu.org", "Subject": "[PATCH] Fix ICE in categorize_decl_for_section with TLS decl (PR\n\tmiddle-end/82095)", "Message-ID": "<20170905211653.GH2323@tucnak>", "Reply-To": "Jakub Jelinek <jakub@redhat.com>", "MIME-Version": "1.0", "Content-Type": "text/plain; charset=us-ascii", "Content-Disposition": "inline", "User-Agent": "Mutt/1.7.1 (2016-10-04)", "X-IsSubscribed": "yes" }, "content": "Hi!\n\nIf a DECL_THREAD_LOCAL_P decl has NULL DECL_INITIAL and\n-fzero-initialized-in-bss (the default), we ICE starting with\nr251602, which changed bss_initializer_p:\n+ /* Do not put constants into the .bss section, they belong in a readonly\n+ section. */\n+ return (!TREE_READONLY (decl)\n+\t &&\nto:\n (DECL_INITIAL (decl) == NULL\n /* In LTO we have no errors in program; error_mark_node is used\n to mark offlined constructors. */\n || (DECL_INITIAL (decl) == error_mark_node\n && !in_lto_p)\n || (flag_zero_initialized_in_bss\n && initializer_zerop (DECL_INITIAL (decl))))\nPreviously because bss_initializer_p for these returned true, ret was\nSECCAT_BSS and therefore we set it to SECCAT_TBSS as intended, but now ret\nis not SECCAT_BSS, but as TLS has only tbss and tdata possibilities, we\nstill want to use tbss. DECL_INITIAL NULL for a decl means implicit zero\ninitialization.\n\nFixed thusly, bootstrapped/regtested on x86_64-linux and i686-linux, ok for\ntrunk?\n\n2017-09-05 Jakub Jelinek <jakub@redhat.com>\n\n\tPR middle-end/82095\n\t* varasm.c (categorize_decl_for_section): Use SECCAT_TBSS for TLS vars with\n\tNULL DECL_INITIAL.\n\n\t* gcc.dg/tls/pr82095.c: New test.\n\n\n\tJakub", "diff": "--- gcc/varasm.c.jj\t2017-09-01 18:43:29.000000000 +0200\n+++ gcc/varasm.c\t2017-09-04 12:29:10.166564776 +0200\n@@ -6562,8 +6562,9 @@ categorize_decl_for_section (const_tree\n /* Note that this would be *just* SECCAT_BSS, except that there's\n \t no concept of a read-only thread-local-data section. */\n if (ret == SECCAT_BSS\n-\t || (flag_zero_initialized_in_bss\n-\t\t && initializer_zerop (DECL_INITIAL (decl))))\n+\t || DECL_INITIAL (decl) == NULL\n+\t || (flag_zero_initialized_in_bss\n+\t && initializer_zerop (DECL_INITIAL (decl))))\n \tret = SECCAT_TBSS;\n else\n \tret = SECCAT_TDATA;\n--- gcc/testsuite/gcc.dg/tls/pr82095.c.jj\t2017-09-04 12:44:16.650538220 +0200\n+++ gcc/testsuite/gcc.dg/tls/pr82095.c\t2017-09-04 12:44:08.000000000 +0200\n@@ -0,0 +1,16 @@\n+/* PR middle-end/82095 */\n+/* { dg-do compile } */\n+/* { dg-options \"-Og -fno-tree-ccp\" } */\n+/* { dg-require-effective-target tls } */\n+/* { dg-add-options tls } */\n+\n+static int b;\n+static __thread int c;\n+\n+void\n+foo (void)\n+{\n+ if (b)\n+ if (c)\n+ b = 1;\n+}\n", "prefixes": [] }