get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2194418,
    "url": "http://patchwork.ozlabs.org/api/patches/2194418/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/gcc/patch/aYkD-WM-YIMULVJB@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": "<aYkD-WM-YIMULVJB@tucnak>",
    "list_archive_url": null,
    "date": "2026-02-08T21:45:29",
    "name": "c++, v2: Add self reference to define_aggregate created aggregates [PR123984]",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "afc6e76a822f83709603f38dc2e4727c98b7bcf9",
    "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/aYkD-WM-YIMULVJB@tucnak/mbox/",
    "series": [
        {
            "id": 491442,
            "url": "http://patchwork.ozlabs.org/api/series/491442/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/gcc/list/?series=491442",
            "date": "2026-02-08T21:45:29",
            "name": "c++, v2: Add self reference to define_aggregate created aggregates [PR123984]",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/491442/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2194418/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2194418/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=DH/DKo3n;\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=DH/DKo3n",
            "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 4f8LxK13Cgz1xvY\n\tfor <incoming@patchwork.ozlabs.org>; Mon, 09 Feb 2026 08:46:09 +1100 (AEDT)",
            "from vm01.sourceware.org (localhost [127.0.0.1])\n\tby sourceware.org (Postfix) with ESMTP id F09B04BAD173\n\tfor <incoming@patchwork.ozlabs.org>; Sun,  8 Feb 2026 21:46:06 +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 E6ACF4C92669\n for <gcc-patches@gcc.gnu.org>; Sun,  8 Feb 2026 21:45:37 +0000 (GMT)",
            "from mx-prod-mc-03.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-378-b_1f2hzPMV2eONLAeEforw-1; Sun,\n 08 Feb 2026 16:45:34 -0500",
            "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-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS\n id 37CCB1955F0E\n for <gcc-patches@gcc.gnu.org>; Sun,  8 Feb 2026 21:45:33 +0000 (UTC)",
            "from tucnak.zalov.cz (unknown [10.44.32.49])\n by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with\n ESMTPS\n id 766871956053; Sun,  8 Feb 2026 21:45:32 +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 618LjTVf1034050\n (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT);\n Sun, 8 Feb 2026 22:45:29 +0100",
            "(from jakub@localhost)\n by tucnak.zalov.cz (8.18.1/8.18.1/Submit) id 618LjTxr1034046;\n Sun, 8 Feb 2026 22:45:29 +0100"
        ],
        "DKIM-Filter": [
            "OpenDKIM Filter v2.11.0 sourceware.org F09B04BAD173",
            "OpenDKIM Filter v2.11.0 sourceware.org E6ACF4C92669"
        ],
        "DMARC-Filter": "OpenDMARC Filter v1.4.2 sourceware.org E6ACF4C92669",
        "ARC-Filter": "OpenARC Filter v1.0.0 sourceware.org E6ACF4C92669",
        "ARC-Seal": "i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1770587138; cv=none;\n b=PYRayR2Ojm15k0jrRwxRGdZIdySgQKsgvQ7CMU9Cv4/lMMvLSdQNd8WyDHhG1w38eWkiqMwA1fYJAgL9dV33QBWDpW/9bXzKdaRR57XqNOdpVgkXwYRDGoITzm4y+HTtpX3ROm3FgwW9U5tV4RnTcE29aYx/wEg1ZrDjw77kay4=",
        "ARC-Message-Signature": "i=1; a=rsa-sha256; d=sourceware.org; s=key;\n t=1770587138; c=relaxed/simple;\n bh=Xk0vEtfyCkxeg3yJPmocZk+bw4xop8y7t5zXWJEUNZ4=;\n h=DKIM-Signature:Date:From:To:Subject:Message-ID:MIME-Version;\n b=By5/ag0kJCJFmb9HOzg5u40iwB1frH0PeJ3bWI2uI1soL/nVEhCfPmeBGiCnumrnX6W9TsQ98i/f4ggKpjC68hpUg8LMKsXZoVqRtphad2cdhhk+zpTS/VCKbuQdBuQx+OH2hpi3IwX/gK7Kq4ypCP1W6xGbrKn24nCl4Y8kRhE=",
        "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=1770587137;\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:in-reply-to:in-reply-to:  references:references;\n bh=J/bMdzaDbQNGLpRPMHi2xZ4JG+s55BSgtG/RkJ9twao=;\n b=DH/DKo3nr2/GnaAsoZkgD3ivJxljnMNInUO7Au9p+Mq6yb01LUBmzfoWDURhAtNyBivs7Z\n FFuK1yaYam7KcHteZo0LOOhYrePeTjjKGz1MSHr9+HvYoivHe+QeaADKavHo/Gg+Rff87k\n sKZedc2/Tn2VibCPUJI/oMMDDkZYIkM=",
        "X-MC-Unique": "b_1f2hzPMV2eONLAeEforw-1",
        "X-Mimecast-MFC-AGG-ID": "b_1f2hzPMV2eONLAeEforw_1770587133",
        "Date": "Sun, 8 Feb 2026 22:45:29 +0100",
        "From": "Jakub Jelinek <jakub@redhat.com>",
        "To": "Jason Merrill <jason@redhat.com>",
        "Cc": "gcc-patches@gcc.gnu.org",
        "Subject": "[PATCH] c++, v2: Add self reference to define_aggregate created\n aggregates [PR123984]",
        "Message-ID": "<aYkD-WM-YIMULVJB@tucnak>",
        "References": "<aYW2mVhiNagYrOHA@tucnak>\n <a91a15cb-c34d-41f2-a0ab-446fda67f459@redhat.com>\n <aYgkmQnRJtn70gb4@tucnak>",
        "MIME-Version": "1.0",
        "In-Reply-To": "<aYgkmQnRJtn70gb4@tucnak>",
        "X-Scanned-By": "MIMEDefang 3.0 on 10.30.177.17",
        "X-Mimecast-Spam-Score": "0",
        "X-Mimecast-MFC-PROC-ID": "pQcL-Bkn06ch7g5DZrK7V1fCaWF3tirXY_DKBdbQO-8_1770587133",
        "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": "On Sun, Feb 08, 2026 at 06:52:26AM +0100, Jakub Jelinek wrote:\n> But sure, I can move the build_self_reference (); call to right\n> after TYPE_BEING_DEFINED (type) = 1; and in that case change\n> tree fields = NULL_TREE; to tree fields = TYPE_FIELDS (type);\n> too if you prefer.  And in that case maybe also remove the\n> gcc_assert (!TYPE_FIELDS (type)).\n\nThough, it clearly is cheaper to do it first when TYPE_FIELDS\nis NULL and so chainon doesn't have to walk all the FIELD_DECLs\nin the list.\n\nSo I'm testing:\n\n2026-02-08  Jakub Jelinek  <jakub@redhat.com>\n\n\tPR c++/123984\n\t* reflect.cc (eval_define_aggregate): Set TYPE_BEING_DEFINED on type\n\tafter pushclass, call build_self_reference, remove assertion that\n\tTYPE_FIELDS (type) is NULL and instead set fields to\n\tTYPE_FIELDS (type).\n\n\t* g++.dg/reflect/define_aggregate6.C: New test.\n\n\n\n\tJakub",
    "diff": "--- gcc/cp/reflect.cc.jj\t2026-02-06 11:18:47.088640019 +0100\n+++ gcc/cp/reflect.cc\t2026-02-08 21:08:01.359261427 +0100\n@@ -6080,8 +6080,9 @@ eval_define_aggregate (location_t loc, c\n   if (!TYPE_BINFO (type))\n     xref_basetypes (type, NULL_TREE);\n   pushclass (type);\n-  gcc_assert (!TYPE_FIELDS (type));\n-  tree fields = NULL_TREE;\n+  TYPE_BEING_DEFINED (type) = 1;\n+  build_self_reference ();\n+  tree fields = TYPE_FIELDS (type);\n   for (int i = 0; i < TREE_VEC_LENGTH (rvec); ++i)\n     {\n       tree ra = TREE_VEC_ELT (rvec, i);\n--- gcc/testsuite/g++.dg/reflect/define_aggregate6.C.jj\t2026-02-05 17:42:07.498427315 +0100\n+++ gcc/testsuite/g++.dg/reflect/define_aggregate6.C\t2026-02-05 17:41:55.461630714 +0100\n@@ -0,0 +1,22 @@\n+// PR c++/123984\n+// { dg-do compile { target c++26 } }\n+// { dg-additional-options \"-freflection\" }\n+\n+#include <meta>\n+\n+struct A;\n+consteval\n+{\n+  define_aggregate (^^A, { data_member_spec (^^int, {.name{\"_\"}}) });\n+}\n+\n+struct B : A {};\n+\n+constexpr int\n+get (B &&d)\n+{\n+  constexpr auto ctx = std::meta::access_context::unchecked ();\n+  return static_cast <A*> (&d)->[: nonstatic_data_members_of (^^A, ctx)[0] :];\n+}\n+\n+static_assert (get (B { 123 }) == 123);\n",
    "prefixes": []
}