get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2222776,
    "url": "http://patchwork.ozlabs.org/api/1.2/patches/2222776/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/gcc/patch/20260413164625.1043333-1-jason@redhat.com/",
    "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": "<20260413164625.1043333-1-jason@redhat.com>",
    "list_archive_url": null,
    "date": "2026-04-13T16:45:44",
    "name": "[pushed] c++: local class in lambda in default targ [PR123566]",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "5b4a1fa6ae2e4324ebb801876e26220650caadea",
    "submitter": {
        "id": 4337,
        "url": "http://patchwork.ozlabs.org/api/1.2/people/4337/?format=api",
        "name": "Jason Merrill",
        "email": "jason@redhat.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/gcc/patch/20260413164625.1043333-1-jason@redhat.com/mbox/",
    "series": [
        {
            "id": 499728,
            "url": "http://patchwork.ozlabs.org/api/1.2/series/499728/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/gcc/list/?series=499728",
            "date": "2026-04-13T16:45:44",
            "name": "[pushed] c++: local class in lambda in default targ [PR123566]",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/499728/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2222776/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2222776/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=HnD0wdXw;\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=HnD0wdXw",
            "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 4fvYH04L17z1yDG\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 14 Apr 2026 02:47:23 +1000 (AEST)",
            "from vm01.sourceware.org (localhost [127.0.0.1])\n\tby sourceware.org (Postfix) with ESMTP id 824954BA2E2D\n\tfor <incoming@patchwork.ozlabs.org>; Mon, 13 Apr 2026 16:47:21 +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 57A054BA2E06\n for <gcc-patches@gcc.gnu.org>; Mon, 13 Apr 2026 16:46:31 +0000 (GMT)",
            "from mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com\n (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by\n relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3,\n cipher=TLS_AES_256_GCM_SHA384) id us-mta-460-51ICPxVKP325q40fQ_XU5A-1; Mon,\n 13 Apr 2026 12:46:27 -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-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS\n id D7818180034F\n for <gcc-patches@gcc.gnu.org>; Mon, 13 Apr 2026 16:46:26 +0000 (UTC)",
            "from jason-thinkpadp1gen4i.rmtusma.csb (unknown [10.22.80.15])\n by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP\n id 6FB43195608E\n for <gcc-patches@gcc.gnu.org>; Mon, 13 Apr 2026 16:46:26 +0000 (UTC)"
        ],
        "DKIM-Filter": [
            "OpenDKIM Filter v2.11.0 sourceware.org 824954BA2E2D",
            "OpenDKIM Filter v2.11.0 sourceware.org 57A054BA2E06"
        ],
        "DMARC-Filter": "OpenDMARC Filter v1.4.2 sourceware.org 57A054BA2E06",
        "ARC-Filter": "OpenARC Filter v1.0.0 sourceware.org 57A054BA2E06",
        "ARC-Seal": "i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1776098791; cv=none;\n b=iuGyuKgdYY0446DdVKKlmq8Ac6loDSQCxQXx0TKmLDXxxIgiLJcDFsMj0K66QlbpHmFFeldEKPyCG4TL0QjT8zzWY6p0mq354xXVMep5cvPAgcOTEx2uUWtH+FwL2CXQKFZIlWqJL6Fg8Kk7F1Xe9X6GAbO28GKijHBhJ7gf3yI=",
        "ARC-Message-Signature": "i=1; a=rsa-sha256; d=sourceware.org; s=key;\n t=1776098791; c=relaxed/simple;\n bh=D7wAgUq8h+iMo5TyluAD9RFXqZZqZvVbez6q9ahVOz0=;\n h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version;\n b=WLysi7wcUzSK53uC6xjSG+PWmzLnXm+onOsTJfK9oYQ+pfOBvzFJjfw1wGHi5pktrdh2ZL764xQ+MnLanw+u1TSV5CjMA9kjeFg9N99aHuM0CEPMxzcoiA+QR4hMEmuwcOpEAhOFkHZTvX+5d3rL86R/sKm4R1LR7dX45OZisEg=",
        "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=1776098791;\n h=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n to:to:cc:mime-version:mime-version:content-type:content-type:\n content-transfer-encoding:content-transfer-encoding;\n bh=MlUdAhvSNBXN+D8ti2GkfkqPhFq1rXFPN+c8lHXj5QQ=;\n b=HnD0wdXwEue20Na8yR8lWwgltZXZjbSuQaG4FIQ9cRVBHZq9ayKIn1PwkJeE8mpiZo0UOM\n Co2GBekxTqBK52P+v7Wl2egE3hhPEgBko2Ub2LrFNIqmXgOpNDT37pBukFE+pKDcYx0yR4\n 9FbjBgzjWDDJ29g+JVBXtI4SPpVzVD4=",
        "X-MC-Unique": "51ICPxVKP325q40fQ_XU5A-1",
        "X-Mimecast-MFC-AGG-ID": "51ICPxVKP325q40fQ_XU5A_1776098787",
        "From": "Jason Merrill <jason@redhat.com>",
        "To": "gcc-patches@gcc.gnu.org",
        "Subject": "[pushed] c++: local class in lambda in default targ [PR123566]",
        "Date": "Mon, 13 Apr 2026 12:45:44 -0400",
        "Message-ID": "<20260413164625.1043333-1-jason@redhat.com>",
        "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": "pEY3X6TuzLpMYaWDyzSW-8FnmesHcGriSX68kViLlcU_1776098787",
        "X-Mimecast-Originator": "redhat.com",
        "Content-Transfer-Encoding": "8bit",
        "content-type": "text/plain; charset=\"US-ASCII\"; x-default=true",
        "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>",
        "Errors-To": "gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org"
    },
    "content": "Tested x86_64-pc-linux-gnu, applying to trunk.\n\n-- 8< --\n\nSince we started to clear processing_template_parmlist within a lambda, we\nstarted to ICE on a local class in such a lambda where previously we would\ngive a (wrong) error.  Let's sorry instead of ICE.\n\nThe failure mode is that in a parmlist current_template_args() is a 0-length\nTREE_VEC, and so tsubst thinks that the type is not dependent, and returns\nthe type unchanged.  We need to overhaul our handling of local classes (and\nenums) in lambdas so that they are regenerated along with the lamba itself;\ninstantiating them based on the surrounding template parms happens to\nwork in some cases but is generally wrong; see also PR100198.\n\n\tPR c++/103901\n\tPR c++/123566\n\ngcc/cp/ChangeLog:\n\n\t* pt.cc (push_template_decl): Sorry on local class in lambda in\n\ttemplate parm list.\n\ngcc/testsuite/ChangeLog:\n\n\t* g++.dg/cpp2a/lambda-targ25.C: New test.\n---\n gcc/cp/pt.cc                               |  7 +++++++\n gcc/testsuite/g++.dg/cpp2a/lambda-targ25.C | 10 ++++++++++\n 2 files changed, 17 insertions(+)\n create mode 100644 gcc/testsuite/g++.dg/cpp2a/lambda-targ25.C\n\n\nbase-commit: e2174f54883a26687b3244246ec8e6154afccc0f",
    "diff": "diff --git a/gcc/cp/pt.cc b/gcc/cp/pt.cc\nindex 96faac7a2b0..cb1a9ab49ae 100644\n--- a/gcc/cp/pt.cc\n+++ b/gcc/cp/pt.cc\n@@ -6378,6 +6378,13 @@ push_template_decl (tree decl, bool is_friend)\n       if (DECL_TEMPLATE_INFO (tmpl))\n \targs = add_outermost_template_args (DECL_TI_ARGS (tmpl), args);\n \n+      /* Bug c++/103901.  Let's sorry now rather than ICE later.  */\n+      if (TREE_VEC_LENGTH (args) == 0\n+\t  && ctx && LAMBDA_FUNCTION_P (ctx)\n+\t  && DECL_IMPLICIT_TYPEDEF_P (decl)\n+\t  && CLASS_TYPE_P (TREE_TYPE (decl)))\n+\tsorry (\"local class in lambda in template parameter list\");\n+\n       tree info = build_template_info (tmpl, args);\n \n       if (DECL_IMPLICIT_TYPEDEF_P (decl))\ndiff --git a/gcc/testsuite/g++.dg/cpp2a/lambda-targ25.C b/gcc/testsuite/g++.dg/cpp2a/lambda-targ25.C\nnew file mode 100644\nindex 00000000000..3bd189f8986\n--- /dev/null\n+++ b/gcc/testsuite/g++.dg/cpp2a/lambda-targ25.C\n@@ -0,0 +1,10 @@\n+// PR c++/123566\n+// { dg-do compile { target c++20 } }\n+\n+template <class T, auto =\n+              [] {\n+                struct { // { dg-bogus \"local class\" \"PR103901\" { xfail *-*-* } }\n+                } s;\t // We would ICE trying to call the constructor.\n+              }>\n+bool v;\n+auto x = v<int>;\n",
    "prefixes": [
        "pushed"
    ]
}