get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2228274,
    "url": "http://patchwork.ozlabs.org/api/1.1/patches/2228274/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/gcc/patch/tencent_20B18E1481F6344D31D08B7F180A5E1CB607@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_20B18E1481F6344D31D08B7F180A5E1CB607@qq.com>",
    "date": "2026-04-25T18:48:08",
    "name": "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_20B18E1481F6344D31D08B7F180A5E1CB607@qq.com/mbox/",
    "series": [
        {
            "id": 501478,
            "url": "http://patchwork.ozlabs.org/api/1.1/series/501478/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/gcc/list/?series=501478",
            "date": "2026-04-25T18:48:08",
            "name": "c++, contracts: fix testsuite basic.contract.eval.p8 failed",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/501478/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2228274/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2228274/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=RjowPZyQ;\n\tdkim-atps=neutral",
            "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org\n (client-ip=38.145.34.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=RjowPZyQ",
            "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=203.205.221.231"
        ],
        "Received": [
            "from vm01.sourceware.org (vm01.sourceware.org [38.145.34.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 4g2zS60yQ1z1y2d\n\tfor <incoming@patchwork.ozlabs.org>; Sun, 26 Apr 2026 04:51:00 +1000 (AEST)",
            "from vm01.sourceware.org (localhost [127.0.0.1])\n\tby sourceware.org (Postfix) with ESMTP id 6565F4BB3BD4\n\tfor <incoming@patchwork.ozlabs.org>; Sat, 25 Apr 2026 18:50:57 +0000 (GMT)",
            "from out203-205-221-231.mail.qq.com (out203-205-221-231.mail.qq.com\n [203.205.221.231])\n by sourceware.org (Postfix) with UTF8SMTPS id D5F6E4BAE7C7;\n Sat, 25 Apr 2026 18:50:17 +0000 (GMT)",
            "from localhost.localdomain ([123.139.9.43])\n by newxmesmtplogicsvrsza53-0.qq.com (NewEsmtp) with SMTP\n id C8A926BC; Sun, 26 Apr 2026 02:50:10 +0800"
        ],
        "DKIM-Filter": [
            "OpenDKIM Filter v2.11.0 sourceware.org 6565F4BB3BD4",
            "OpenDKIM Filter v2.11.0 sourceware.org D5F6E4BAE7C7"
        ],
        "DMARC-Filter": "OpenDMARC Filter v1.4.2 sourceware.org D5F6E4BAE7C7",
        "ARC-Filter": "OpenARC Filter v1.0.0 sourceware.org D5F6E4BAE7C7",
        "ARC-Seal": "i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1777143019; cv=none;\n b=Z3xtAUVxvxEEnxveN0sDK9pk+8EaH2FHEfYDgaG7kK9ZBKphIZehUuz0PgDuxPbjuBW5qGYy/XmFCH0iqF0GrxE7d3YS2zaJjlQAAu9HzXsjURLpEWLHqY20ONOElPXjgge5v+qVuir7g/C/QmCTGWM8YEKEKxg+muTQb71eWdc=",
        "ARC-Message-Signature": "i=1; a=rsa-sha256; d=sourceware.org; s=key;\n t=1777143019; c=relaxed/simple;\n bh=4p3yB6+Lg9JKbLf+USaIR19DC1lX5mUvsENuAy1ITG0=;\n h=DKIM-Signature:Message-ID:From:To:Subject:Date:MIME-Version;\n b=Hx1gHVCZiTKQbR2USC2qYmK+hcbvnZZsNNz+rle0cNTY6xvtiUluHmEQrLdP/aiBibGGVbO2DvlKbhWsd5ZWogcs1uXS4Ca4PVHKlMIE7Jn6I3mewhSevUDhSbwPmaQ2x39WLZCFD74B9GatSclrwUIs3Jmmh2nlrtajCgk4gak=",
        "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=1777143013; bh=00teIN183g8MJ0MxKpwh2p5S9/EU3QjwOUQWicBWQMU=;\n h=From:To:Cc:Subject:Date;\n b=RjowPZyQya6dxz1I81BNIR7wZMXiCOATDr9HXX6afQ2pgpFL9MKo+M+7ABLcMnQHR\n tXSFdHB9sCNt11siJog+zl1rKVxZVzWkPz39t27wB5fAhjeTvPuvxdJRf75zTem2dc\n usmM7JjGwuf7H1O0sA2NowuRm5QvvympLEBeBXAk=",
        "X-QQ-mid": "xmsmtpt1777143010tm161l6wd",
        "Message-ID": "<tencent_20B18E1481F6344D31D08B7F180A5E1CB607@qq.com>",
        "X-QQ-XMAILINFO": "NU1WwRH9AHfmUu4yCGqae6FtRfam7fMTX5x7+NeCQxnI/6Akhhn9tNFGOh6lbG\n mJAV0RlupIiDayYU4NaMV5RkXQFqXBhT32oOeStkLP0FheZbrH8walpQI7yN95n/h30c1/xI7563\n qgM/uQcyuFTD5T+KqIij0lfESKNyo2U4VMDpH649v++MMY9BMV81u7WvsvL02ONgG+Gc5EoWbVa/\n v/vpeZNOlc90MTNHDA4CdBfZ9Khf+L5EyD48aa+4kMSugFVHE7760pLO3SJplrcVdqMXjkVtafOa\n asOymOPExg4w0Z6Raq57tZlJPB0i4KfgQH7DwF/QgVuXCDP1xC0LCgC4YUgxoJ8XKLHa/Jz6GuVQ\n KQZldEhuhMqjZKKw9SpctebIwoU4iAOgW20ahUL0b8l+U0rvG5bY8Uhap3FI8oPr1T2d1ZMCrdgr\n 6jkYm1/zFmdr+6cjnfrpiCQlL6Zr1YPz80h9YnxXDWnCxBecSnUqRNt5zC1FoeDW6pYXtOCWZC25\n OR9IgL6i28R2rBldjLchzj8q1VZK5VFQNKmkWsZtxrCXHB+oNaETu3A0fz2VhiU0pEGs7WfCNMfe\n XLmlANRAa1E0qdhJjZix6hTXfvoVjiAYCHdNnImLUixzPI8IY5FIQE+i+hIO6TpZMLh3twmqu8WW\n rea53P4Eu6Q7SVQ22ZsxOEiTLtkYQMbJuIP42Cucdm+GoMV1JtYLqYNOsPHYzKrW478CiicYFWCt\n vXid8vdMl8RHvjS7GgyyrGD2fIsVBhTOL/+jNsnwsYdc0E+1rmwXUEyMccPl4PZrY7UXRf3sl0f3\n +BFVfrUM2ABsfJLMOl2armqf6he1Jfyppd3qUoCXo2K67RjL1+lrG7Fb+KVUD6qGjmfDQaZyNVap\n vhCInjr6z6/rCB+Qjnt2ljMtLqNmGptLlpNlZzmPCTAug/R9Hft0ByEFGz0WUw6k9d8ALy1Mb2l7\n YCbgS01D+xOaxEaVF/qjqrfeWgcYNEjHwfuIg9DKikXZJe+LYbaCKqNGjYUKk+eAriP1ceBDdyAB\n tFRMcsjg==",
        "X-QQ-XMRINFO": "NI4Ajvh11aEjEMj13RCX7UuhPEoou2bs1g==",
        "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] c++, contracts: fix testsuite basic.contract.eval.p8 failed",
        "Date": "Sun, 26 Apr 2026 02:48:08 +0800",
        "X-OQ-MSGID": "<20260425184808.137886-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 mark true.\n\ngcc/cp/ChangeLog:\n\t* contracts.c (cxx_eval_constant_expression): mark\n\tnon_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": []
}