get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2223306,
    "url": "http://patchwork.ozlabs.org/api/1.1/patches/2223306/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/gcc/patch/20260414231905.191063-40-arthur.cohen@embecosm.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": "<20260414231905.191063-40-arthur.cohen@embecosm.com>",
    "date": "2026-04-14T23:19:01",
    "name": "[COMMITTED,40/43] gccrs: Fix ICE in unused var when we hit unit const type",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "f5c4467097f6b37fddfb4f08dc26245a94237d6f",
    "submitter": {
        "id": 83476,
        "url": "http://patchwork.ozlabs.org/api/1.1/people/83476/?format=api",
        "name": "Arthur Cohen",
        "email": "arthur.cohen@embecosm.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/gcc/patch/20260414231905.191063-40-arthur.cohen@embecosm.com/mbox/",
    "series": [
        {
            "id": 499900,
            "url": "http://patchwork.ozlabs.org/api/1.1/series/499900/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/gcc/list/?series=499900",
            "date": "2026-04-14T23:18:24",
            "name": "[COMMITTED,01/43] gccrs: testsuite:Add a testcase for setup_associated_types",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/499900/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2223306/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2223306/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 (2048-bit key;\n unprotected) header.d=embecosm.com header.i=@embecosm.com header.a=rsa-sha256\n header.s=google header.b=gpMz22/e;\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=embecosm.com header.i=@embecosm.com header.a=rsa-sha256\n header.s=google header.b=gpMz22/e",
            "sourceware.org;\n dmarc=none (p=none dis=none) header.from=embecosm.com",
            "sourceware.org; spf=pass smtp.mailfrom=embecosm.com",
            "server2.sourceware.org;\n arc=none smtp.remote-ip=209.85.128.68"
        ],
        "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 4fwLGW5V5Dz1yHc\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 15 Apr 2026 09:34:43 +1000 (AEST)",
            "from vm01.sourceware.org (localhost [127.0.0.1])\n\tby sourceware.org (Postfix) with ESMTP id E53244BA2E1C\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 14 Apr 2026 23:34:41 +0000 (GMT)",
            "from mail-wm1-f68.google.com (mail-wm1-f68.google.com\n [209.85.128.68])\n by sourceware.org (Postfix) with ESMTPS id AC9104BA9012\n for <gcc-patches@gcc.gnu.org>; Tue, 14 Apr 2026 23:15:14 +0000 (GMT)",
            "by mail-wm1-f68.google.com with SMTP id\n 5b1f17b1804b1-488afb0427eso74456315e9.1\n for <gcc-patches@gcc.gnu.org>; Tue, 14 Apr 2026 16:15:14 -0700 (PDT)",
            "from platypus.localdomain (176-147-231-59.abo.bbox.fr.\n [176.147.231.59]) by smtp.gmail.com with ESMTPSA id\n 5b1f17b1804b1-488f1dd8806sm3325945e9.3.2026.04.14.16.15.11\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Tue, 14 Apr 2026 16:15:12 -0700 (PDT)"
        ],
        "DKIM-Filter": [
            "OpenDKIM Filter v2.11.0 sourceware.org E53244BA2E1C",
            "OpenDKIM Filter v2.11.0 sourceware.org AC9104BA9012"
        ],
        "DMARC-Filter": "OpenDMARC Filter v1.4.2 sourceware.org AC9104BA9012",
        "ARC-Filter": "OpenARC Filter v1.0.0 sourceware.org AC9104BA9012",
        "ARC-Seal": "i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1776208514; cv=none;\n b=cbhrL9CBDelYthI+6YaxmZH2fFe/jjkjvLlKEQjckK3pUTsX4/e/TZeL5KSIMt8f/jb4qjqRAKNIp4jUGmogvrGgJ8TQeIauyxmCzSSCJweMwLyVV+NftTi3gjUVsYZqwnCJ754/CS2+EFlJzZK4d+CexGyWoInOKwUJSyYIzGQ=",
        "ARC-Message-Signature": "i=1; a=rsa-sha256; d=sourceware.org; s=key;\n t=1776208514; c=relaxed/simple;\n bh=0uhjkOHThW1vQU/spYPRMmFlJwz9Pz6FLaqyqhCgRtk=;\n h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version;\n b=sv07MFSkjy/XfP9vWpcP2iPhdLzS4IdueiC8wlJGqLjbk2cfUCgXPocTMcDQWuq8GH+yNeFwZNlqVACoY1qlrdEotnM4iYAK9gOQIKOieRiF0KPHB8cZxFBw/D6KB+esDBc+SKnqsVrf4s5o7QRSOx6/B5kW0IL8HJ3UiOIQqkw=",
        "ARC-Authentication-Results": "i=1; server2.sourceware.org",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=embecosm.com; s=google; t=1776208513; x=1776813313; darn=gcc.gnu.org;\n h=content-transfer-encoding:mime-version:references:in-reply-to\n :message-id:date:subject:cc:to:from:from:to:cc:subject:date\n :message-id:reply-to;\n bh=KSR1eyVOQYOOKrDpK4fmpRMZr0InA5bq2UAWcoEp2NI=;\n b=gpMz22/e6rgiZ+OvrUl33FDimN0LU6KmsXKlTyj2dypLxZQSDCl7Eha2TwMeX0Oni4\n ozic/2N7B8UzMHd/URIYBQE0NVnMJ3lZwO02fCP1d018vJ8jzMJPz0AYUS4zwVZJ0ste\n kTEquyotea5rNKJTFGLCSSvQGCC+c40G2rX7RKWt0SArQuhXwQrV8yIkaudOVd+OEm7z\n VnfjK63iQ4EvYZBsKctRPGdIc0X2pELmHF7wtv6pZkT0Wm28hRpnikpf5f0Yf+6PwkC8\n e3c8kDkYDeNfew1ex7iuO6rYVXZ1Wl3sc8/453INg0TrjQbsrsw+Q+L63olM2gZNqZP3\n W7pg==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20251104; t=1776208513; x=1776813313;\n h=content-transfer-encoding:mime-version:references:in-reply-to\n :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from\n :to:cc:subject:date:message-id:reply-to;\n bh=KSR1eyVOQYOOKrDpK4fmpRMZr0InA5bq2UAWcoEp2NI=;\n b=YBjfSP5PtEm5dm7Y7RwRJQy7ihG6UsVPCEFg75/MrC4m+L00P3c/MxkU0ODa47Drsl\n siEJOHPD69toOyJjrdJod1hJxa406N2WhF8MGxOiD/Yc1zyxVr8b05E3pKhb5nyZtGCM\n z/8MXAZTYrzoQSyklYga170wdYywuWEzxMOfF43I42vf0oFjmYAzDXkR/xERnK6ragJ/\n hhmm0o0diLqIicsSwB06G1EhTQkHBBQi0zr/w9Lore33J49rG91OXvnmPrEA77RBb2Ls\n s6WLJPyTY1xCDE3j+dElkwO9+UG/6BzMfP8LarOBP0tOBecExazanaWWF9xjLHBtnJFf\n slHg==",
        "X-Gm-Message-State": "AOJu0YwjqKGHrJv8i9j8zXbrjAT81B+48mtYPoy6QVuFwP8LwDNpnvyI\n 5ZdRsSIQyJ1TU//Wegx5Pw8W66gZcP8VaOD9313k4VAcEpOGeoHwx6VGsiVvuND6nO29YvDrp2P\n vA4Q7QHkV",
        "X-Gm-Gg": "AeBDieurFvuiH5dtBVEwaplb4mmHhgUezh08HSQ6GhkOewPsUe2Pt45w4nfzbOs+GS2\n xiM/Y+s5ujUac/sOjk+ku2PfHMvFQWB7WqtPHwjbz9xWx+NX2I2b9AhhBJhLshMJWVdY/2BgD/Q\n 0UOQqnrkxcGlpx6uZ3LqVq4hkbjz4lNyZkZ3hZL/VbPuv11Jo5tt7ZLM3IuT2fxcs9PWlcdbdh+\n /8QdA9sVBauu+V9QBPqkqxLWd2qUVWO5gG+ydC2oYcSya020k7mOdc3nkgAllpldhcc9sTIME5X\n /X3O4JPk/SCTbXLfh0JA/EHu6kDGBfeQoE/s7dyHp14bcNC1lY9+lbmVfcRX0nYxMj31TZ1bl8G\n sexOtwusVV+dcRT0minYired5K033xGFcCGQBjdVYuyEjxL0J4aCUFGDO4Q7XWn6WwT6+6IosbW\n Sf1K7gr6dXiDk38YzeScZEMnntWhJidmDhyDdXwPZ3ChXDREC57jM3HN0qQMhDq1iQEBUPC3HYx\n BIyXTxi3ABWJYZu",
        "X-Received": "by 2002:a05:600c:a306:b0:480:20f1:7aa6 with SMTP id\n 5b1f17b1804b1-488d68607e8mr187230005e9.21.1776208513306;\n Tue, 14 Apr 2026 16:15:13 -0700 (PDT)",
        "From": "arthur.cohen@embecosm.com",
        "To": "gcc-patches@gcc.gnu.org",
        "Cc": "gcc-rust@gcc.gnu.org,\n\tIslam-Imad <islamimad404@gmail.com>",
        "Subject": "[COMMITTED 40/43] gccrs: Fix ICE in unused var when we hit unit const\n type",
        "Date": "Wed, 15 Apr 2026 01:19:01 +0200",
        "Message-ID": "<20260414231905.191063-40-arthur.cohen@embecosm.com>",
        "X-Mailer": "git-send-email 2.50.1",
        "In-Reply-To": "<20260414231905.191063-1-arthur.cohen@embecosm.com>",
        "References": "<20260414231905.191063-1-arthur.cohen@embecosm.com>",
        "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": "From: Islam-Imad <islamimad404@gmail.com>\n\nthe problem is compiling if-expr doesn't set translated to unit type.\n\ngcc/rust/ChangeLog:\n\n\t* backend/rust-compile-expr.cc (CompileExpr::visit): set unit type.\n\ngcc/testsuite/ChangeLog:\n\n\t* rust/compile/issue-4517.rs: New test.\n\nSigned-off-by: Islam-Imad <islamimad404@gmail.com>\n---\n gcc/rust/backend/rust-compile-expr.cc    | 8 +++++---\n gcc/testsuite/rust/compile/issue-4517.rs | 5 +++++\n 2 files changed, 10 insertions(+), 3 deletions(-)\n create mode 100644 gcc/testsuite/rust/compile/issue-4517.rs",
    "diff": "diff --git a/gcc/rust/backend/rust-compile-expr.cc b/gcc/rust/backend/rust-compile-expr.cc\nindex 40bd2829f65..55b3534a1be 100644\n--- a/gcc/rust/backend/rust-compile-expr.cc\n+++ b/gcc/rust/backend/rust-compile-expr.cc\n@@ -360,6 +360,7 @@ CompileExpr::visit (HIR::IfExpr &expr)\n {\n   auto stmt = CompileConditionalBlocks::compile (&expr, ctx, nullptr);\n   ctx->add_statement (stmt);\n+  translated = unit_expression (expr.get_locus ());\n }\n \n void\n@@ -367,9 +368,7 @@ CompileExpr::visit (HIR::InlineAsm &expr)\n {\n   CompileAsm asm_codegen (ctx);\n   ctx->add_statement (asm_codegen.tree_codegen_asm (expr));\n-  // translated = build_asm_expr (0, NULL_TREE, NULL_TREE, NULL_TREE, NULL_TREE,\n-  //\t\t       NULL_TREE, true, true);\n-  // CompileAsm::asm_build_expr (expr);\n+  translated = unit_expression (expr.get_locus ());\n }\n \n void\n@@ -377,6 +376,7 @@ CompileExpr::visit (HIR::LlvmInlineAsm &expr)\n {\n   CompileLlvmAsm asm_codegen (ctx);\n   ctx->add_statement (asm_codegen.tree_codegen_asm (expr));\n+  translated = unit_expression (expr.get_locus ());\n }\n \n void\n@@ -848,6 +848,7 @@ CompileExpr::visit (HIR::WhileLoopExpr &expr)\n \n   tree loop_expr = Backend::loop_expression (loop_block, expr.get_locus ());\n   ctx->add_statement (loop_expr);\n+  translated = unit_expression (expr.get_locus ());\n }\n \n void\n@@ -1099,6 +1100,7 @@ CompileExpr::visit (HIR::AssignmentExpr &expr)\n     = Backend::assignment_statement (lvalue, rvalue, expr.get_locus ());\n \n   ctx->add_statement (assignment);\n+  translated = unit_expression (expr.get_locus ());\n }\n \n // Helper for CompileExpr::visit (HIR::MatchExpr).\ndiff --git a/gcc/testsuite/rust/compile/issue-4517.rs b/gcc/testsuite/rust/compile/issue-4517.rs\nnew file mode 100644\nindex 00000000000..9db4082a191\n--- /dev/null\n+++ b/gcc/testsuite/rust/compile/issue-4517.rs\n@@ -0,0 +1,5 @@\n+#![feature(no_core)]\n+#![no_core]\n+\n+const _: () = if true {};\n+const x: () = if true {}; // { dg-warning \"unused name\" \"\" { target *-*-* } }\n",
    "prefixes": [
        "COMMITTED",
        "40/43"
    ]
}