get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2218011,
    "url": "http://patchwork.ozlabs.org/api/patches/2218011/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/gcc/patch/20260331091844.3000-1-gerris.rs@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": "<20260331091844.3000-1-gerris.rs@gmail.com>",
    "list_archive_url": null,
    "date": "2026-03-31T09:18:44",
    "name": "[gccrs,COMMIT] rust: Fix ICE in function_set_parameters",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "93493f4e6fbdef22ed190b26620e64daad1049c8",
    "submitter": {
        "id": 92092,
        "url": "http://patchwork.ozlabs.org/api/people/92092/?format=api",
        "name": null,
        "email": "gerris.rs@gmail.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/gcc/patch/20260331091844.3000-1-gerris.rs@gmail.com/mbox/",
    "series": [
        {
            "id": 498155,
            "url": "http://patchwork.ozlabs.org/api/series/498155/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/gcc/list/?series=498155",
            "date": "2026-03-31T09:18:44",
            "name": "[gccrs,COMMIT] rust: Fix ICE in function_set_parameters",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/498155/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2218011/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2218011/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=cS296tuR;\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 (2048-bit key,\n unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256\n header.s=20251104 header.b=cS296tuR",
            "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.219.46"
        ],
        "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 4flMxz1Hfhz1y1q\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 31 Mar 2026 20:19:19 +1100 (AEDT)",
            "from vm01.sourceware.org (localhost [127.0.0.1])\n\tby sourceware.org (Postfix) with ESMTP id D76694BB58EF\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 31 Mar 2026 09:19:16 +0000 (GMT)",
            "from mail-qv1-f46.google.com (mail-qv1-f46.google.com\n [209.85.219.46])\n by sourceware.org (Postfix) with ESMTPS id B15854BA2E0E\n for <gcc-patches@gcc.gnu.org>; Tue, 31 Mar 2026 09:18:46 +0000 (GMT)",
            "by mail-qv1-f46.google.com with SMTP id\n 6a1803df08f44-8a3342d301aso5336166d6.2\n for <gcc-patches@gcc.gnu.org>; Tue, 31 Mar 2026 02:18:46 -0700 (PDT)",
            "from\n runnervmrg6be.dbuonr3pa2ke1den2z05x4ud3h.ex.internal.cloudapp.net\n ([64.236.169.0]) by smtp.gmail.com with ESMTPSA id\n 6a1803df08f44-89ecc1908f0sm91220766d6.20.2026.03.31.02.18.44\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Tue, 31 Mar 2026 02:18:45 -0700 (PDT)"
        ],
        "DKIM-Filter": [
            "OpenDKIM Filter v2.11.0 sourceware.org D76694BB58EF",
            "OpenDKIM Filter v2.11.0 sourceware.org B15854BA2E0E"
        ],
        "DMARC-Filter": "OpenDMARC Filter v1.4.2 sourceware.org B15854BA2E0E",
        "ARC-Filter": "OpenARC Filter v1.0.0 sourceware.org B15854BA2E0E",
        "ARC-Seal": "i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1774948726; cv=none;\n b=dQah/K6XIY7wYY52engXHszqy4vmEsrNQtgLFPw57UGT9NRejERHaGrb4/AxLzcASlJ8nXFzW2+glTgsAjz78kY07YXrYkf6q8ZbmdoykluX9IIkeYOsPwNuhxWvCAeYUu20Q7uw9NIJgChdOZ9hAnU6lXUAg7u2uCGdsQYWiEk=",
        "ARC-Message-Signature": "i=1; a=rsa-sha256; d=sourceware.org; s=key;\n t=1774948726; c=relaxed/simple;\n bh=4/zz7SrVQp9TCSl7yZcBrzWPRL2B8KZLkYLLwoQtMLk=;\n h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version;\n b=HCEgZnsJbRCnGfXibjmKLlvb5z96hxdCWhPozFRQST2Y9Bi0OBgR9oJHm8YmJC05MWObJ7uH6vEtzbo+vPQXL683tQ43sObaWJ2AAHLiivfabStMVPSZWpSGgXefZJePomlMFUYsIkRRXam162l+kaNOg5m64kud4GNnHRa3/bY=",
        "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=1774948726; x=1775553526; 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=P+dS193/IwCkFI+IVbhVFA9O9shTklNWL++eqmI/w3Y=;\n b=cS296tuR+PTija3iHgqtXY5EvXAOMMCOXrVbeqvbdGf4Sp1T0mKQJzEGMvnmuukbau\n SmnEiDB4/yvxP8DQVB1OzmZt/B0GA7YQ/BTSOo4/w1GiMurgEGdsP6Ky6cTEKykBHCQG\n BBDOSSx1U4xwQYzJeHFzryIMcUSxz8opdgMoifS6ly0XPE7qsr0wDp2I7opu72gN3qSi\n Y1pdVxy8qVQRcCGZj9SoNINYavNsjBLMUhAKy0Os6j1ETE5etUgm0T6AP4R1xyDU1wUS\n Goq1X2iLMVRK/dlVYUS46TxeR1ifeCRFgNLG/3EDjbQhl3grjI9my3DCtBcwojyw84SF\n 8Gig==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20251104; t=1774948726; x=1775553526;\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=P+dS193/IwCkFI+IVbhVFA9O9shTklNWL++eqmI/w3Y=;\n b=gsIhccPVZyvcBI9qxz2+PxTGC0MEmDioCBl3cntPRr4WoVS4BGqx8YtaAtiY138ve3\n uivUxl+XhCB6FDXXL3raMrevgZb32yjS01Q25d4qmDnmAJxWfGzgWdCMeFrnPKz/JR+q\n AHlPlb2wFviaiJ9w3NTmMdaqMQGPKZA+BxHz2PJPENf+ytnlRReMH8eD0pOYOw5F/frp\n NIXW/pLT7ciT0KR0Qvx2abiS0VjW0nmGzCKu8PQ9TYzZBmmDtJQy5fPa2iTpcKxOc2na\n PFxT4m2w1I6KkXrne3opA3SE6JAdSLs4uWmzbzsxrlw+MV+/heWpEgbv4SSZt3gEqtc9\n LGEQ==",
        "X-Gm-Message-State": "AOJu0YwNZG7dLGuLCPjMP4BGKe3SAjtH/cRhCmPzaUnzkxZFB0b53FU0\n PvCE7iljL8/mmWCmW5XFrX9+vlmM4pZMxIESwJ5ozzXQiEQXxt+pMMP9JzhbzA==",
        "X-Gm-Gg": "ATEYQzzGA8D71t3BJ0UL0Bhdzjr/2/wSKuCKriBp3XxPmPXDS0ZNP5UQbfqmA4Ghs5G\n eNvDqP40YEGctXgxP2kF+k7vbAZN8/KX7NFJ6Doli4jR4Q9ydG6cryyRpMWSxDLx63AxYo61D+A\n OvkNjByODEslapySTCBJEmbkos7ESdqip9XNXq05UBTHVG1kQaXRIcxROzGOwmq+PyiEIZtb2M9\n 8UqM/yD2f340C0z7Ond7xQE8KViiIWSjvWnBvFa65FzlMPb9S4lGFDF01cs/CG8jgiqCh1F+2n8\n RID6xAD++06MDhZ9QpsxdlXRjiGEMzf3+zo/LOza+R/wqdhKKWwGPjb1MwaESiVA2Ng5xvy3vC5\n RmwtKoTc7sWb0d87XNdWfAaxQDDbfIT524YI4kpenE71o7geO0PuTQh++Gi1m9gB+oLXL85gYyR\n KuuXDcpOdgpYloOu4xOJwBivadyJhGoQf1Txw6uYZVhqepNY6Y/DDDWuiRexrdSxG/Bi6+YlRcW\n gPQoXATgFCkK6cFQBP+",
        "X-Received": "by 2002:a05:6214:2505:b0:8a0:e931:5fbe with SMTP id\n 6a1803df08f44-8a0e9317af0mr108677536d6.29.1774948725804;\n Tue, 31 Mar 2026 02:18:45 -0700 (PDT)",
        "From": "gerris.rs@gmail.com",
        "To": "gcc-patches@gcc.gnu.org,\n\tgcc-rust@gcc.gnu.org",
        "Cc": "pierre-emmanuel.patry@embecosm.com, arthur.cohen@embecosm.com,\n dkm+gccrs@kataplop.net, Egas Ribeiro <egas.g.ribeiro@tecnico.ulisboa.pt>",
        "Subject": "[gccrs COMMIT] rust: Fix ICE in function_set_parameters",
        "Date": "Tue, 31 Mar 2026 09:18:44 +0000",
        "Message-ID": "<20260331091844.3000-1-gerris.rs@gmail.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": "From: Egas Ribeiro <egas.g.ribeiro@tecnico.ulisboa.pt>\n\nWhen lowering a function to HIR with a refutable pattern in its\nparameter pattern, we were ICE'ing due to a lack of checks for invalid\nrefutable patterns. Fix this by erroring on invalid patterns while\nlowering a function.\n\n\tFixes Rust-GCC/gccrs#3919\n\ngcc/rust/ChangeLog:\n\n\t* hir/rust-ast-lower-item.cc (ASTLoweringItem::visit): added\n\trefutable pattern checks for function params.\n\ngcc/testsuite/ChangeLog:\n\n\t* rust/compile/issue-3919-ice-func-parms.rs: New test.\n\nSigned-off-by: Egas Ribeiro <egas.g.ribeiro@tecnico.ulisboa.pt>\n---\nThis change was merged into the gccrs repository and is posted here for\nupstream visibility and potential drive-by review, as requested by GCC\nrelease managers.\nEach commit email contains a link to its details on github from where you can\nfind the Pull-Request and associated discussions.\n\n\nCommit on github: https://github.com/Rust-GCC/gccrs/commit/593fb1594a708a200a5129ff1191f7fede04d3c2\n\nThe commit has been mentioned in the following pull-request(s):\n - https://github.com/Rust-GCC/gccrs/pull/4501\n\n gcc/rust/hir/rust-ast-lower-item.cc           | 19 +++++++++++++++++++\n .../rust/compile/issue-3919-ice-func-parms.rs |  4 ++++\n 2 files changed, 23 insertions(+)\n create mode 100644 gcc/testsuite/rust/compile/issue-3919-ice-func-parms.rs\n\n\nbase-commit: de7dffce247c236349b418215c820ecb8965b090",
    "diff": "diff --git a/gcc/rust/hir/rust-ast-lower-item.cc b/gcc/rust/hir/rust-ast-lower-item.cc\nindex 2d3d021f8..96b6aefbc 100644\n--- a/gcc/rust/hir/rust-ast-lower-item.cc\n+++ b/gcc/rust/hir/rust-ast-lower-item.cc\n@@ -455,6 +455,25 @@ ASTLoweringItem::visit (AST::Function &function)\n \n       auto translated_pattern = std::unique_ptr<HIR::Pattern> (\n \tASTLoweringPattern::translate (param.get_pattern ()));\n+\n+      switch (param.get_pattern ().get_pattern_kind ())\n+\t{\n+\tcase AST::Pattern::Kind::Identifier:\n+\tcase AST::Pattern::Kind::Wildcard:\n+\tcase AST::Pattern::Kind::Tuple:\n+\tcase AST::Pattern::Kind::Struct:\n+\tcase AST::Pattern::Kind::TupleStruct:\n+\tcase AST::Pattern::Kind::Reference:\n+\tcase AST::Pattern::Kind::Grouped:\n+\tcase AST::Pattern::Kind::Slice:\n+\tcase AST::Pattern::Kind::Rest:\n+\t  break;\n+\tdefault:\n+\t  rust_error_at (param.get_locus (),\n+\t\t\t \"refutable pattern in function argument\");\n+\t  continue;\n+\t}\n+\n       auto translated_type = std::unique_ptr<HIR::Type> (\n \tASTLoweringType::translate (param.get_type ()));\n \ndiff --git a/gcc/testsuite/rust/compile/issue-3919-ice-func-parms.rs b/gcc/testsuite/rust/compile/issue-3919-ice-func-parms.rs\nnew file mode 100644\nindex 000000000..3305762bb\n--- /dev/null\n+++ b/gcc/testsuite/rust/compile/issue-3919-ice-func-parms.rs\n@@ -0,0 +1,4 @@\n+#![feature(no_core)]\n+#![no_core]\n+\n+fn func(1: i32) {} // { dg-error \"refutable pattern in function argument\" }\n",
    "prefixes": [
        "gccrs",
        "COMMIT"
    ]
}