get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2228278,
    "url": "http://patchwork.ozlabs.org/api/1.1/patches/2228278/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/gcc/patch/tencent_795EFDB353C0E3448CA5A590B713691A810A@qq.com/",
    "project": {
        "id": 17,
        "url": "http://patchwork.ozlabs.org/api/1.1/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
    },
    "msgid": "<tencent_795EFDB353C0E3448CA5A590B713691A810A@qq.com>",
    "date": "2026-04-25T19:26:42",
    "name": "[v2] c++, contracts: fix testsuite basic.contract.eval.p8 failed",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "72bc6ed50d78cb200dcc55dc82fca7a50e7bb97d",
    "submitter": {
        "id": 89506,
        "url": "http://patchwork.ozlabs.org/api/1.1/people/89506/?format=api",
        "name": "yxj-github-437",
        "email": "2457369732@qq.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/gcc/patch/tencent_795EFDB353C0E3448CA5A590B713691A810A@qq.com/mbox/",
    "series": [
        {
            "id": 501482,
            "url": "http://patchwork.ozlabs.org/api/1.1/series/501482/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/gcc/list/?series=501482",
            "date": "2026-04-25T19:26:42",
            "name": "[v2] c++, contracts: fix testsuite basic.contract.eval.p8 failed",
            "version": 2,
            "mbox": "http://patchwork.ozlabs.org/series/501482/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2228278/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2228278/checks/",
    "tags": {},
    "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=qq.com header.i=@qq.com header.a=rsa-sha256\n header.s=s201512 header.b=uViJ6mxQ;\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=qq.com header.i=@qq.com header.a=rsa-sha256\n header.s=s201512 header.b=uViJ6mxQ",
            "sourceware.org;\n dmarc=pass (p=quarantine dis=none) header.from=qq.com",
            "sourceware.org; spf=pass smtp.mailfrom=qq.com",
            "server2.sourceware.org;\n arc=none smtp.remote-ip=162.62.58.211"
        ],
        "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 4g30JX26k8z1yHS\n\tfor <incoming@patchwork.ozlabs.org>; Sun, 26 Apr 2026 05:29:30 +1000 (AEST)",
            "from vm01.sourceware.org (localhost [127.0.0.1])\n\tby sourceware.org (Postfix) with ESMTP id D35574BB3B8E\n\tfor <incoming@patchwork.ozlabs.org>; Sat, 25 Apr 2026 19:29:27 +0000 (GMT)",
            "from out162-62-58-211.mail.qq.com (out162-62-58-211.mail.qq.com\n [162.62.58.211])\n by sourceware.org (Postfix) with UTF8SMTPS id 118864BB3B8E;\n Sat, 25 Apr 2026 19:28:49 +0000 (GMT)",
            "from localhost.localdomain ([123.139.9.43])\n by newxmesmtplogicsvrszc43-0.qq.com (NewEsmtp) with SMTP\n id 72BA26CE; Sun, 26 Apr 2026 03:28:43 +0800"
        ],
        "DKIM-Filter": [
            "OpenDKIM Filter v2.11.0 sourceware.org D35574BB3B8E",
            "OpenDKIM Filter v2.11.0 sourceware.org 118864BB3B8E"
        ],
        "DMARC-Filter": "OpenDMARC Filter v1.4.2 sourceware.org 118864BB3B8E",
        "ARC-Filter": "OpenARC Filter v1.0.0 sourceware.org 118864BB3B8E",
        "ARC-Seal": "i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1777145331; cv=none;\n b=hrcfpLPGvntmCkGX1gS08AeJWmp2bvSWnRk9q1420bZUQ2RzBdQLRV51e40Q80w666mzgSR1mm3l0zInM1LopmxGnbOqXy3HqmIhg1R/0n8Ofc+g5IB69eio2zc8zFJQQz68dLnypyobsu/MD4HqiQwgNe/4KJnAONzPBKMEk9I=",
        "ARC-Message-Signature": "i=1; a=rsa-sha256; d=sourceware.org; s=key;\n t=1777145331; c=relaxed/simple;\n bh=mxiHe8g8CD6+RKj3uPI482YbxbbpplHMzNGbAMIufK8=;\n h=DKIM-Signature:Message-ID:From:To:Subject:Date:MIME-Version;\n b=WAuYwN5dXbhPN/OPGY8V251uwV5rk0B9x6oBgGtaicxgygk7eN1Ojx7QkjFyb0xp9vMXe8qSS2YiZ7P2pEjefuAg8SksuUwEH77IJdY4VyMIrwj2Yw/x3S5BbsZwu+f8nFKcxOcvG4vxgZkq36slv+cPr5gYnzRN64WOAB6LThs=",
        "ARC-Authentication-Results": "i=1; server2.sourceware.org",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=qq.com; s=s201512;\n t=1777145326; bh=K3afa3X67Mp9gyEKMAE9vumwq+Y/X9+20zNPeEVvyJE=;\n h=From:To:Cc:Subject:Date;\n b=uViJ6mxQ2PeimaXV6C76LTM5d58tckxjOzNY1cYNJJ7MD/T7PN2qk5/tp40HxJiGe\n 4JlKswa/JzdZDiLKxbXYtfG7JqkQ3yXBGB8zyqZdo14WaPQg+Ub6cgb089HfPeXyO8\n tcsjNpxl4u9HmrECswlQnFwcg68FQTsCSUR/0Pm4=",
        "X-QQ-mid": "xmsmtpt1777145323tha57qnyz",
        "Message-ID": "<tencent_795EFDB353C0E3448CA5A590B713691A810A@qq.com>",
        "X-QQ-XMAILINFO": "M1rD3f8svNznC7p4Qi08ar+bUwvoFbXI6CB/PgX9Dty1DFEhzsTIyMfMFu0VDq\n V/aN3GPz6xUaiOKzBW0tv+ZdnEmTEzjMJBxu7O+1GWrFihmF4ntotPwiT2edBlOeeXBJqyGZSkLS\n FPVpeOoQhaKEj2nmSy+fZU0zRtfVzepq+Dku1W+/azb3bDl8Y9u0MXPzxowMkWSqObSp3Ke5uJhm\n fKcnCfsfqm8GHv0SI8dkCIq2Kdi+xqFB/mmeL7Vu07Lzy1v2wRZW2kjso5Emy9LlxMuSXo3acO0E\n nC5zSf9OJO66UdjQBfsQgM12OZLbCEeEV8AbJNMzrudJooLsF/7dmS9mvhuggM3PctjvcB/bO4dn\n F7TLXRvDqjZC4HmSDFBc+RyPjHeUpdyjdbUjROJRtQfT2zQyOlBI3jTXv5urHJQMR+9njPRsn63z\n v1+IHSSXQ+9kiIOuMVd3t87KElOTEwKQ58Vw8neBJdsqgqIWl5+VrTM7XyaH9QmGqQKSbuaQy+wR\n QS9IwwKZFWkX4GPyEmQVWO5Ov5m6KOI7UKqFUxGqHFv8EuFwD4acfk/gYSeXx5r0qoUXz+b2yZ13\n 3gQz3SbaZ0peMN+qIGQ3dkeCX+9svR7L1bmRXS1wgTsd53lyFzMZFfY7nFImQ4CUo3geg4J3DSPG\n +eb+i5ZfyUNJGDPW2fBIV20obD3RFEQWAOyQ244TXh8B/Lfj2x4y+6O7Lag5Gg8TUVyb4aXQqBkP\n ZA4n6GWs+J+HxUNfSG36djy4BfEYDmNMasWSNTqPYG8BT2H/4hhuJOlNHD9cRXAyqqBXbQirfdNx\n 8Nub/0yyW7q9AHMOcxpA46NlJMmdZ25sDESgrsuMYzRVruqmdxgpf7ThqLhO/43qVpHp3u3ax446\n bsfGHLwLzt+yt8Jt7bFQH/7pDeoQlDbMkxxS6rzgPvPmolL+lezlJ3I+DDdwzBtac9TACaAbSYOk\n VvX2Ji0/dRTAdQylLaXeaFG8LOqJN5Re2ZrUYhbAXJvbaOM3mpAKz8fL7c3BB/ekJbYcqlkhElrN\n InzmvFQZzcwpB6cn5RBgso2nNfdupbAkJVCInFRGnfe4RuQQZPeBrQbLAk1DFQechkPHiQ9w==",
        "X-QQ-XMRINFO": "MPJ6Tf5t3I/ylTmHUqvI8+Wpn+Gzalws3A==",
        "From": "yxj-github-437 <2457369732@qq.com>",
        "To": "gcc-patches@gcc.gnu.org",
        "Cc": "jason@redhat.com, nathan@acm.org, ppalka@gcc.gnu.org,\n yxj-github-437 <2457369732@qq.com>",
        "Subject": "[PATCH v2] c++,\n contracts: fix testsuite basic.contract.eval.p8 failed",
        "Date": "Sun, 26 Apr 2026 03:26:42 +0800",
        "X-OQ-MSGID": "<20260425192642.148958-1-2457369732@qq.com>",
        "X-Mailer": "git-send-email 2.43.0",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "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": "In constant expression, when contract check fail, the non_constant_p\nshould be set true.\n\ngcc/cp/ChangeLog:\n\t* constexpr.cc (cxx_eval_constant_expression): mark\n\t*non_constant_p true since contract stmt check failed\n---\n gcc/cp/constexpr.cc | 7 ++++++-\n 1 file changed, 6 insertions(+), 1 deletion(-)",
    "diff": "diff --git a/gcc/cp/constexpr.cc b/gcc/cp/constexpr.cc\nindex a593b66dd41..a8c0c5a45d0 100644\n--- a/gcc/cp/constexpr.cc\n+++ b/gcc/cp/constexpr.cc\n@@ -10528,6 +10528,7 @@ cxx_eval_constant_expression (const constexpr_ctx *ctx, tree t,\n  \t  {\n  \t    ctx->global->contract_statement = t;\n  \t    ctx->global->contract_condition_non_const = true;\n+\t    *non_constant_p = true;\n  \t    break;\n \t  }\n \n@@ -10550,11 +10551,15 @@ cxx_eval_constant_expression (const constexpr_ctx *ctx, tree t,\n  \t  {\n  \t    ctx->global->contract_statement = t;\n  \t    ctx->global->contract_condition_non_const = true;\n+\t    *non_constant_p = true;\n  \t    break;\n \t  }\n \t/* Constant, but check failed.  */\n \tif (integer_zerop (eval))\n-\t  ctx->global->contract_statement = t;\n+\t  {\n+\t    ctx->global->contract_statement = t;\n+\t    *non_constant_p = true;\n+\t  }\n       }\n       break;\n \n",
    "prefixes": [
        "v2"
    ]
}