get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2227438,
    "url": "http://patchwork.ozlabs.org/api/patches/2227438/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/gcc/patch/20260423174330.1463462-1-avinal.xlvii@gmail.com/",
    "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": "<20260423174330.1463462-1-avinal.xlvii@gmail.com>",
    "list_archive_url": null,
    "date": "2026-04-23T17:43:30",
    "name": "tree-ssa-strlen: Replace with gimple_build [PR122989]",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "59724af0419e3c48ce3a68c7298aa7f4e34242c3",
    "submitter": {
        "id": 88549,
        "url": "http://patchwork.ozlabs.org/api/people/88549/?format=api",
        "name": "Avinal Kumar",
        "email": "avinal.xlvii@gmail.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/gcc/patch/20260423174330.1463462-1-avinal.xlvii@gmail.com/mbox/",
    "series": [
        {
            "id": 501230,
            "url": "http://patchwork.ozlabs.org/api/series/501230/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/gcc/list/?series=501230",
            "date": "2026-04-23T17:43:30",
            "name": "tree-ssa-strlen: Replace with gimple_build [PR122989]",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/501230/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2227438/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2227438/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 (2048-bit key;\n unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256\n header.s=20251104 header.b=A1bf1nr7;\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 (2048-bit key,\n unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256\n header.s=20251104 header.b=A1bf1nr7",
            "sourceware.org;\n dmarc=pass (p=none dis=none) header.from=gmail.com",
            "sourceware.org; spf=pass smtp.mailfrom=gmail.com",
            "server2.sourceware.org;\n arc=none smtp.remote-ip=209.85.214.170"
        ],
        "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 4g1k3z26Mdz1yDD\n\tfor <incoming@patchwork.ozlabs.org>; Fri, 24 Apr 2026 03:44:13 +1000 (AEST)",
            "from vm01.sourceware.org (localhost [127.0.0.1])\n\tby sourceware.org (Postfix) with ESMTP id 0EAF64BABF3B\n\tfor <incoming@patchwork.ozlabs.org>; Thu, 23 Apr 2026 17:44:12 +0000 (GMT)",
            "from mail-pl1-f170.google.com (mail-pl1-f170.google.com\n [209.85.214.170])\n by sourceware.org (Postfix) with ESMTPS id 61F224BA9021\n for <gcc-patches@gcc.gnu.org>; Thu, 23 Apr 2026 17:43:46 +0000 (GMT)",
            "by mail-pl1-f170.google.com with SMTP id\n d9443c01a7336-2a9296b3926so40577175ad.1\n for <gcc-patches@gcc.gnu.org>; Thu, 23 Apr 2026 10:43:46 -0700 (PDT)",
            "from fedoraemon.neon-universe.ts.net\n ([2406:7400:11d:a9dc:9a14:72eb:1a60:868a])\n by smtp.gmail.com with ESMTPSA id\n d9443c01a7336-2b5fab20c4fsm250519915ad.59.2026.04.23.10.43.42\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Thu, 23 Apr 2026 10:43:43 -0700 (PDT)"
        ],
        "DKIM-Filter": [
            "OpenDKIM Filter v2.11.0 sourceware.org 0EAF64BABF3B",
            "OpenDKIM Filter v2.11.0 sourceware.org 61F224BA9021"
        ],
        "DMARC-Filter": "OpenDMARC Filter v1.4.2 sourceware.org 61F224BA9021",
        "ARC-Filter": "OpenARC Filter v1.0.0 sourceware.org 61F224BA9021",
        "ARC-Seal": "i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1776966226; cv=none;\n b=FEpV8WtmCimvAfJ4p4lP6HnF8PEQayU7TCkLdoUdCaoiO42My1xV9/LYLCMLbARgYMFDtfodHPmhygCABrAbiGx1oJSAjjd50FCKrWeTO65yckmHziSxedl2s1viv1OB0JPZKpqnXrqzYZRmO7v0r9GOPTebgDNEzrJEyPWh6rs=",
        "ARC-Message-Signature": "i=1; a=rsa-sha256; d=sourceware.org; s=key;\n t=1776966226; c=relaxed/simple;\n bh=vguCR+6C5Uatu+8vg78nX432FlETGEGXVbbH6G2nFb8=;\n h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version;\n b=xpPmRAqJxmDU+AYrQasVUicA8h5PsWHTfjdnkyKdfa2aaZZz8Wwr11qGoeHMfrGnaLuQ2EBOUR7GvI+Ersyw/aWenAsHYCA17lbetbHhLbRthd7N/KDkdVg0isOGByS3hNr/fH8UCUQHdLNCSwKPdmV2LZgxv2pvQlTNFyJWhhU=",
        "ARC-Authentication-Results": "i=1; server2.sourceware.org",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=gmail.com; s=20251104; t=1776966225; x=1777571025; darn=gcc.gnu.org;\n h=content-transfer-encoding:mime-version:message-id:date:subject:cc\n :to:from:from:to:cc:subject:date:message-id:reply-to;\n bh=tj+F+5DRibT9PNP5ulvN62wNm6L7214UgaNSS2VtZW4=;\n b=A1bf1nr7XRkiq5NJFkQXWbsdZw99VsYuVLZ51b0k0Mip3SbSkALwGB3d8todZiwjI9\n iBagnbIe3m4xah9JU3EKWZ213HpPBoDgaIgjLtlFVa0PpcovLJ3gtsM6x+g8eAc/52hH\n mocvHvrFarqRoGw2veax8PJjSlIu5lpNsEk9dH4yqFczG5yxlsiNx70Fqgg3/weZXttb\n WnQ5n8KAnil+RBBECH191244Lei6PKy3ym1mt32iG9xErHyWLH03cTh8Mb4XSTsvr04h\n N3H8QAMmlQqyqDwpZWoAs3kbd+YwKB0UKXII5xxvZEzciovU9fiZkc83LA3Lak7/rqW8\n p/Nw==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20251104; t=1776966225; x=1777571025;\n h=content-transfer-encoding:mime-version:message-id:date:subject:cc\n :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date\n :message-id:reply-to;\n bh=tj+F+5DRibT9PNP5ulvN62wNm6L7214UgaNSS2VtZW4=;\n b=j56zvEmQOyeNf+3wvqEDP/bpHBOVp/1eAbg+ZKOo/ynUcpY/MUDPqb4TcY+0DQCeFP\n LlLCLocytNbPVgNuEaeWtLPlyPBhvpy8dLqv04XZe/g67KuKdGdAOYow9oJT5MpkAMB6\n 44eNbaZr3o/LAbw4LGfY714xmctjSTGcTeZDg09dYoJkmBU0/uI1+8lK0WBdrXyyDmsv\n D2WHdm28QvM0hJ0jhJ+2HBHrOF66HDegAs8HZUwZXacP6gBNvlAB1rkXM38vqbWm3/nN\n Btb5tvUwYYWhukgl188JChhFJ3/yTF3C+Tins+Zf3B3UfqZLmSWeCgqvJfa3POX/mKv7\n YlvA==",
        "X-Gm-Message-State": "AOJu0YzrN1siFdFGNMyC9OgugFuzjD9qQknQIogN8UbyzSA1bYs5/mGT\n trRPzQqNH6LTsZBmTt/6P7EF+IRJxwt/ytMRPnYEj03WasH0alWw7HVBUx2Tpg==",
        "X-Gm-Gg": "AeBDieu8Uo556+L5+CH0228RUqqDgezc+8e/fnHeBY7Ve2ZcUrJGFEmS29Z5m5a7i+0\n CtBQLWv0qCjsqtiAJ/gcDxZQkVOwlYfCunkvqqpQZDFtQtbVGvlxO+9tvM83+1cAAIahuq+1eSj\n 7qimoentqLKaryc8b7sbaXmyBZo5iKmam2cgeGQhfWwNJ3i933ZzvA+h5BaHqyvCG8wRvTa8ip2\n vFID9atiK/KPYdgUrXJacLwv5U3FPh9unfkIa2Bi+Yk3qLngASEFY3+ahPh99dn+wA9jUIrSAma\n /v1DEMjR9phJD9bE5Aoko09lKADxP/APoCyGralFZ5sb0mRiCJYwgMLrpEd6zRmzUr397PGkf4q\n OZgj4oCkWo8OhIUig6mICzSRaEKsd5SJHYGfNXLzl9uCohXm3y0eGev7UbFp92Gqo8y6D/UPYYB\n lVmwvSgHwR+tVEiI2WhAslaANoQ6jwlHCNEIzupMtj7DkxrH998rs0ksPFhULtmfs8tw==",
        "X-Received": "by 2002:a17:903:1ac6:b0:2b2:50bd:83ac with SMTP id\n d9443c01a7336-2b5f9fbe8b7mr273487295ad.40.1776966224666;\n Thu, 23 Apr 2026 10:43:44 -0700 (PDT)",
        "From": "Avinal Kumar <avinal.xlvii@gmail.com>",
        "To": "gcc-patches@gcc.gnu.org",
        "Cc": "andrew.pinski@oss.qualcomm.com",
        "Subject": "[PATCH] tree-ssa-strlen: Replace with gimple_build [PR122989]",
        "Date": "Thu, 23 Apr 2026 23:13:30 +0530",
        "Message-ID": "<20260423174330.1463462-1-avinal.xlvii@gmail.com>",
        "X-Mailer": "git-send-email 2.53.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": "Replace convert_to_ptrofftype, force_gimple_operand_gsi,\ngimple_build_assign, and gsi_insert_call function calls\nwith gimple_convert_to_ptrofftype and gimple_build.\n\nSigned-off-by: Avinal Kumar <avinal.xlvii@gmail.com>\n---\nHello, this is my first patch to GCC. I ran the style check and it passes,\nbut the style feels a bit odd to me. I couldn't find a better commit message\nand body for this change. Please suggest if they should be improved.\n\nThanks,\nAvinal\n\n gcc/tree-ssa-strlen.cc | 18 +++++++-----------\n 1 file changed, 7 insertions(+), 11 deletions(-)",
    "diff": "diff --git a/gcc/tree-ssa-strlen.cc b/gcc/tree-ssa-strlen.cc\nindex c698998f5d8..70d45e36b3f 100644\n--- a/gcc/tree-ssa-strlen.cc\n+++ b/gcc/tree-ssa-strlen.cc\n@@ -877,17 +877,13 @@ get_string_length (strinfo *si)\n \t  gimple_set_vuse (lenstmt, gimple_vuse (stmt));\n \t  gsi_insert_before (&gsi, lenstmt, GSI_SAME_STMT);\n \t  tem = gimple_call_arg (stmt, 0);\n-          if (!ptrofftype_p (TREE_TYPE (lhs)))\n-            {\n-              lhs = convert_to_ptrofftype (lhs);\n-              lhs = force_gimple_operand_gsi (&gsi, lhs, true, NULL_TREE,\n-                                              true, GSI_SAME_STMT);\n-            }\n-\t  lenstmt = gimple_build_assign\n-\t\t\t(make_ssa_name (TREE_TYPE (gimple_call_arg (stmt, 0))),\n-\t\t\t POINTER_PLUS_EXPR,tem, lhs);\n-\t  gsi_insert_before (&gsi, lenstmt, GSI_SAME_STMT);\n-\t  gimple_call_set_arg (stmt, 0, gimple_assign_lhs (lenstmt));\n+\t  lhs = gimple_convert_to_ptrofftype (&gsi, true, GSI_SAME_STMT,\n+\t\t\t\t\t\tgimple_location (stmt), lhs);\n+\t  tem = gimple_build (&gsi, true, GSI_SAME_STMT,\n+\t\t\t\tgimple_location (stmt), POINTER_PLUS_EXPR,\n+\t\t\t\tTREE_TYPE (gimple_call_arg (stmt, 0)),\n+\t\t\t\ttem, lhs);\n+\t  gimple_call_set_arg (stmt, 0, tem);\n \t  lhs = NULL_TREE;\n \t  /* FALLTHRU */\n \tcase BUILT_IN_STRCPY:\n",
    "prefixes": []
}