get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/patches/2222984/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 2222984,
    "url": "http://patchwork.ozlabs.org/api/patches/2222984/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/gcc/patch/ad3kw8Oxl96rQrzD@tucnak/",
    "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": "<ad3kw8Oxl96rQrzD@tucnak>",
    "list_archive_url": null,
    "date": "2026-04-14T06:54:59",
    "name": "c++: Mark in cxx_mark_addressable DECL_VALUE_EXPR of DECL_ANON_UNION_VAR_P too [PR124850]",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "99f3986b1bbaa45b082382fff30f361acf89950d",
    "submitter": {
        "id": 671,
        "url": "http://patchwork.ozlabs.org/api/people/671/?format=api",
        "name": "Jakub Jelinek",
        "email": "jakub@redhat.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/gcc/patch/ad3kw8Oxl96rQrzD@tucnak/mbox/",
    "series": [
        {
            "id": 499788,
            "url": "http://patchwork.ozlabs.org/api/series/499788/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/gcc/list/?series=499788",
            "date": "2026-04-14T06:54:59",
            "name": "c++: Mark in cxx_mark_addressable DECL_VALUE_EXPR of DECL_ANON_UNION_VAR_P too [PR124850]",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/499788/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2222984/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2222984/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org>",
        "X-Original-To": [
            "incoming@patchwork.ozlabs.org",
            "gcc-patches@gcc.gnu.org"
        ],
        "Delivered-To": [
            "patchwork-incoming@legolas.ozlabs.org",
            "gcc-patches@gcc.gnu.org"
        ],
        "Authentication-Results": [
            "legolas.ozlabs.org;\n\tdkim=pass (1024-bit key;\n unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256\n header.s=mimecast20190719 header.b=F6io3umM;\n\tdkim-atps=neutral",
            "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org\n (client-ip=2620:52:6:3111::32; helo=vm01.sourceware.org;\n envelope-from=gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org;\n receiver=patchwork.ozlabs.org)",
            "sourceware.org;\n\tdkim=pass (1024-bit key,\n unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256\n header.s=mimecast20190719 header.b=F6io3umM",
            "sourceware.org; dmarc=pass (p=quarantine dis=none)\n header.from=redhat.com",
            "sourceware.org; spf=pass smtp.mailfrom=redhat.com",
            "server2.sourceware.org;\n arc=none smtp.remote-ip=170.10.133.124"
        ],
        "Received": [
            "from vm01.sourceware.org (vm01.sourceware.org\n [IPv6:2620:52:6:3111::32])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4fvw5j5B5Tz1xtJ\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 14 Apr 2026 16:55:36 +1000 (AEST)",
            "from vm01.sourceware.org (localhost [127.0.0.1])\n\tby sourceware.org (Postfix) with ESMTP id 550AB4BA2E32\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 14 Apr 2026 06:55:34 +0000 (GMT)",
            "from us-smtp-delivery-124.mimecast.com\n (us-smtp-delivery-124.mimecast.com [170.10.133.124])\n by sourceware.org (Postfix) with ESMTP id 5824D4BA2E09\n for <gcc-patches@gcc.gnu.org>; Tue, 14 Apr 2026 06:55:06 +0000 (GMT)",
            "from mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com\n (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by\n relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3,\n cipher=TLS_AES_256_GCM_SHA384) id us-mta-62-gnnPRYd2N2GoUw8CknHv1Q-1; Tue,\n 14 Apr 2026 02:55:04 -0400",
            "from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com\n (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17])\n (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest\n SHA256)\n (No client certificate requested)\n by mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS\n id 7139C1956089\n for <gcc-patches@gcc.gnu.org>; Tue, 14 Apr 2026 06:55:03 +0000 (UTC)",
            "from tucnak.zalov.cz (unknown [10.44.33.129])\n by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with\n ESMTPS\n id CEF2F1955D71; Tue, 14 Apr 2026 06:55:02 +0000 (UTC)",
            "from tucnak.zalov.cz (localhost [127.0.0.1])\n by tucnak.zalov.cz (8.18.1/8.18.1) with ESMTPS id 63E6sxsi2951648\n (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT);\n Tue, 14 Apr 2026 08:55:00 +0200",
            "(from jakub@localhost)\n by tucnak.zalov.cz (8.18.1/8.18.1/Submit) id 63E6sxPb2951647;\n Tue, 14 Apr 2026 08:54:59 +0200"
        ],
        "DKIM-Filter": [
            "OpenDKIM Filter v2.11.0 sourceware.org 550AB4BA2E32",
            "OpenDKIM Filter v2.11.0 sourceware.org 5824D4BA2E09"
        ],
        "DMARC-Filter": "OpenDMARC Filter v1.4.2 sourceware.org 5824D4BA2E09",
        "ARC-Filter": "OpenARC Filter v1.0.0 sourceware.org 5824D4BA2E09",
        "ARC-Seal": "i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1776149706; cv=none;\n b=jrIqj1I8c8bhmtUJruxOMwE7e8xepe+lVi6pU2XeJFWr50aJJ1/PD1Oki/Ubwwqubqom0IP3b6pMurkacQh1hj6ws5uJFPhEWfjlw8uhIvBNy/junMbpuIMCTsHdltkm6DyuQ+lFf0KtJk6bNQDKTZVMRcr6M0dlNMOyF5Xl7Dk=",
        "ARC-Message-Signature": "i=1; a=rsa-sha256; d=sourceware.org; s=key;\n t=1776149706; c=relaxed/simple;\n bh=uwWz1kDKELFidcNc+X5xb2lPfnY/L6Fkub3JAz2AGTI=;\n h=DKIM-Signature:Date:From:To:Subject:Message-ID:MIME-Version;\n b=D8MgUJJv9VoNvkoezVUhudmHPj37A0YqOqxleSbDtRHUEttx4TodX8292ajhvCBEJfLwus6po2wD7PpUWi4ZjRelReQn3p42Q4JdDUgs0G+iK5XG/07JdnSGPB9UQrdOSBBky+rmmDlP7MWAxhO02RpxeHMxrG/LGNzR8XIr9ok=",
        "ARC-Authentication-Results": "i=1; server2.sourceware.org",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n s=mimecast20190719; t=1776149705;\n h=from:from:reply-to:reply-to:subject:subject:date:date:\n message-id:message-id:to:to:cc:cc:mime-version:mime-version:\n content-type:content-type; bh=yFKDjr0LUn+yk7+a/JFHd3GWzf9cVQR54CPmEnRGtWA=;\n b=F6io3umMAGFGxXviUZtSXRtMH09QuU7G/EfdX3tHkWEjfmyJUHhUJyk/2hoMrbRbJgEo96\n Dp7lJE6oGYRAgLIxcaFkZZGXt3McOjK1+t7Rr8//D518ozfCCLdA5r9bzVy3WfZ/Q1US/w\n OGDrDRVF9EKGGXUSMv8rjNcQbNgZ5+o=",
        "X-MC-Unique": "gnnPRYd2N2GoUw8CknHv1Q-1",
        "X-Mimecast-MFC-AGG-ID": "gnnPRYd2N2GoUw8CknHv1Q_1776149703",
        "Date": "Tue, 14 Apr 2026 08:54:59 +0200",
        "From": "Jakub Jelinek <jakub@redhat.com>",
        "To": "Jason Merrill <jason@redhat.com>",
        "Cc": "gcc-patches@gcc.gnu.org",
        "Subject": "[PATCH] c++: Mark in cxx_mark_addressable DECL_VALUE_EXPR of\n DECL_ANON_UNION_VAR_P too [PR124850]",
        "Message-ID": "<ad3kw8Oxl96rQrzD@tucnak>",
        "MIME-Version": "1.0",
        "X-Scanned-By": "MIMEDefang 3.0 on 10.30.177.17",
        "X-Mimecast-Spam-Score": "0",
        "X-Mimecast-MFC-PROC-ID": "rGxdCnHzgSexQleGPt3TzWoTdcSzmuDdgCi7Gmo7-Rs_1776149703",
        "X-Mimecast-Originator": "redhat.com",
        "Content-Type": "text/plain; charset=us-ascii",
        "Content-Disposition": "inline",
        "X-BeenThere": "gcc-patches@gcc.gnu.org",
        "X-Mailman-Version": "2.1.30",
        "Precedence": "list",
        "List-Id": "Gcc-patches mailing list <gcc-patches.gcc.gnu.org>",
        "List-Unsubscribe": "<https://gcc.gnu.org/mailman/options/gcc-patches>,\n <mailto:gcc-patches-request@gcc.gnu.org?subject=unsubscribe>",
        "List-Archive": "<https://gcc.gnu.org/pipermail/gcc-patches/>",
        "List-Post": "<mailto:gcc-patches@gcc.gnu.org>",
        "List-Help": "<mailto:gcc-patches-request@gcc.gnu.org?subject=help>",
        "List-Subscribe": "<https://gcc.gnu.org/mailman/listinfo/gcc-patches>,\n <mailto:gcc-patches-request@gcc.gnu.org?subject=subscribe>",
        "Reply-To": "Jakub Jelinek <jakub@redhat.com>",
        "Errors-To": "gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org"
    },
    "content": "Hi!\n\nThe following testcase ICEs since my PR53932 change in checking,\nbecause it sees address of the unnamed anon union VAR_DECL taken\nbut without having TREE_ADDRESSABLE set.\n\nThe following patch sets it during cxx_mark_addressable.  I'm wondering\nhow we can get away with not marking other DECL_VALUE_EXPR cases,\nbut couldn't come up with a testcase where it would be needed (e.g. for\nstructured bindings, etc.).  So just doing it for anon union vars seems\nsafer to me at least for now.\n\nBootstrapped/regtrested on x86_64-linux and i686-linux, ok for trunk?\n\n2026-04-14  Jakub Jelinek  <jakub@redhat.com>\n\n\tPR c++/124850\n\t* typeck.cc (cxx_mark_addressable): For DECL_ANON_UNION_VAR_P vars\n\talso mark their DECL_VALUE_EXPR.\n\n\t* g++.dg/other/anon-union8.C: New test.\n\n\n\tJakub",
    "diff": "--- gcc/cp/typeck.cc.jj\t2026-04-10 08:45:20.717811786 +0200\n+++ gcc/cp/typeck.cc\t2026-04-13 12:22:59.261032495 +0200\n@@ -8281,6 +8281,10 @@ cxx_mark_addressable (tree exp, bool arr\n \t\t    || DECL_IN_AGGR_P (x) == 0\n \t\t    || TREE_STATIC (x)\n \t\t    || DECL_EXTERNAL (x));\n+\tif (VAR_P (x)\n+\t    && DECL_ANON_UNION_VAR_P (x)\n+\t    && !TREE_ADDRESSABLE (x))\n+\t  cxx_mark_addressable (DECL_VALUE_EXPR (x));\n \t/* Fall through.  */\n \n       case RESULT_DECL:\n--- gcc/testsuite/g++.dg/other/anon-union8.C.jj\t2026-04-13 12:25:10.095803730 +0200\n+++ gcc/testsuite/g++.dg/other/anon-union8.C\t2026-04-13 12:23:51.409144168 +0200\n@@ -0,0 +1,11 @@\n+// PR c++/124850\n+// { dg-do compile }\n+\n+static union { int i; };\n+int &r = i;\n+\n+int\n+foo ()\n+{\n+  return r;\n+}\n",
    "prefixes": []
}