get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2222448,
    "url": "http://patchwork.ozlabs.org/api/patches/2222448/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/gcc/patch/20260411213430.3097-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": "<20260411213430.3097-1-gerris.rs@gmail.com>",
    "list_archive_url": null,
    "date": "2026-04-11T21:34:29",
    "name": "[gccrs,COMMIT,1/2] Fixed glob-import all ICE",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "b065e609db8b37add87bf5f31ce792f072777eaf",
    "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/20260411213430.3097-1-gerris.rs@gmail.com/mbox/",
    "series": [
        {
            "id": 499577,
            "url": "http://patchwork.ozlabs.org/api/series/499577/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/gcc/list/?series=499577",
            "date": "2026-04-11T21:34:29",
            "name": "[gccrs,COMMIT,1/2] Fixed glob-import all ICE",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/499577/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2222448/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2222448/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=c4+Kdahs;\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=c4+Kdahs",
            "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.222.180"
        ],
        "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 4ftRm505lBz1yCv\n\tfor <incoming@patchwork.ozlabs.org>; Sun, 12 Apr 2026 07:35:15 +1000 (AEST)",
            "from vm01.sourceware.org (localhost [127.0.0.1])\n\tby sourceware.org (Postfix) with ESMTP id 3E5674BA2E19\n\tfor <incoming@patchwork.ozlabs.org>; Sat, 11 Apr 2026 21:35:13 +0000 (GMT)",
            "from mail-qk1-f180.google.com (mail-qk1-f180.google.com\n [209.85.222.180])\n by sourceware.org (Postfix) with ESMTPS id 2419E4BA2E0F\n for <gcc-patches@gcc.gnu.org>; Sat, 11 Apr 2026 21:34:34 +0000 (GMT)",
            "by mail-qk1-f180.google.com with SMTP id\n af79cd13be357-8d933da14f0so354799385a.2\n for <gcc-patches@gcc.gnu.org>; Sat, 11 Apr 2026 14:34:34 -0700 (PDT)",
            "from\n runnervm35a4x.net0ibprzlqujb4ppu2xd1znfd.ex.internal.cloudapp.net\n ([64.236.177.96]) by smtp.gmail.com with ESMTPSA id\n af79cd13be357-8ddb33a0826sm513468885a.0.2026.04.11.14.34.31\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Sat, 11 Apr 2026 14:34:33 -0700 (PDT)"
        ],
        "DKIM-Filter": [
            "OpenDKIM Filter v2.11.0 sourceware.org 3E5674BA2E19",
            "OpenDKIM Filter v2.11.0 sourceware.org 2419E4BA2E0F"
        ],
        "DMARC-Filter": "OpenDMARC Filter v1.4.2 sourceware.org 2419E4BA2E0F",
        "ARC-Filter": "OpenARC Filter v1.0.0 sourceware.org 2419E4BA2E0F",
        "ARC-Seal": "i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1775943274; cv=none;\n b=jXxt2fRkarnAGRHdOBgWHW27R4k9eb6KlVV5Bri1lYSMmadrMbzqj8e7HQwr7GtOSaogXsSMqfbLcEIr1k1rV8MNCbx6lt4hJrTcX8o0dc3ZriSxNQPTIVI+xvft6Al7cS1UG5oymN3GsizQQQCTo07S491gxsmszWo9eyZNFL0=",
        "ARC-Message-Signature": "i=1; a=rsa-sha256; d=sourceware.org; s=key;\n t=1775943274; c=relaxed/simple;\n bh=EGngxa58a/T9aChbbZJq283kqyfskPviPpvNgoOx23Q=;\n h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version;\n b=YxyKXNeqG7ENLoH+6AyqVjhLszyfHl1e6RQGamw/aT/5dVu2FyzNCjkcVCuMk2WX6YN6ktGAtClUh37bZ7v7NCXjBs2R9o7kfRWcXfOFPq7XGryCdKndP6A6RkdjaiCS6I2H5rH0KvyceHhZP5msjcsvTB/HUhHHCM2JGV3WmU4=",
        "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=1775943273; x=1776548073; 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=ojUIz+VBMIza2RPe6yHgltYvN++MDGK1p4qK1xu0/0g=;\n b=c4+KdahsrZinU/3snFbRTuOIgFJJgr4cNSDtE5hB/qFPKpAbubZQNlbRnPWZfmm+kp\n XxFHN/27btSoOMPKRo9I9hixiuhJ9juY+GqGhOuuaUaJiyqRHkvXU5muKtufmUULgA0h\n /XJHJ6oQjnFX217ZQO2EdK6hG7MWH4Zcoy6oeqduIXOQWiHW6OlLLVzbaiadVyxZAfYj\n RATqLwWYDW4aEJG+Lv/xjw3mfNScMku73WbZX1ZXLUultBmQLwY2yD5I51pWRTj5Ndgd\n sAHswIqsE5BD3P8fJjkUOzBhSX69K/bQgukTQIon1oijkFFUprtBC0RlbwUmbubfyHfE\n by3w==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20251104; t=1775943273; x=1776548073;\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=ojUIz+VBMIza2RPe6yHgltYvN++MDGK1p4qK1xu0/0g=;\n b=aWgsNkcmJ+S4qdEacZKaVdRhOk8BLF3RnY/nkOFBJMRSpr/hC7UIQgFF1hjMLnJV8a\n 0koOWASCaVnYeddqkqUj80TwRI38/135BclMnMR/cw9hXaao7RAe0I6uxy9xwYuaq3Yi\n AUgVVB2nasoJEE6cB8emHfKVTBo9QEk7vb0t3ECDzIN1f2Zjc00nofoNMgHHsdBHFDm0\n ZhTURlyCw+TikMlWWtpq0aESr3z0ikGzymmeHhQErol73ay9x+gDYtd1nWgRDEDVTi8w\n 3odWotIeH7lTxv9LJbBkDNFQu9QDEFpZIofGE3qIFSyXrDpy4VKxgHIoPLjfULqTsTwh\n 2dUQ==",
        "X-Gm-Message-State": "AOJu0Ywe2LaZcDLHXXua5+xEcYV17JDd32c7AGlqLCeHH6OJzdrvP9RW\n jaF7BngwkYnmuafU6pedd5jyy4oOErJT4lqgm88uZsPW579d5Wx4MmVJS6TUzQ==",
        "X-Gm-Gg": "AeBDievxkRc9andAJAnQsGbU3HEDLZulsNGFsokY1qrM1xlQxHUGGLz9IFnQZs0gX6d\n +lei0I0D2ijbUFGq3DoDwhid07ud0xFXjY4K1i1Y5+ee9VFZ8z7/FOZbyB/uzOR7EEA0yvwKIq1\n 2QtJenYfi4OK5gSc5syelsOEbHSZr0l/t0WsCWEJX98KFGf0CHbiOHSjR85ZNlUi2qPbHW3thEf\n 7scoOAyRj61eam99ghu6J0WPGckudyDdjScmhv0OK/B/wwkq7WvEYZ50v14O2UXQ5cRXCGqbp9m\n h2yE8Ew4H4ppgnwwMJ7dS+Uyj63YS8YA/w8jdGSiyfrixYlKlCmJh3UdNkLN5Zriz33RDN3nEmr\n hEDpEaWvki08nImnPQjUXJ6TPcM9PUK6lQXrgJw+waTzwwlGf4b9nA7+/b3pm/sU8uFCtc64H7X\n YOTpL2uhMgAlBJfKi7eaNqaBlFtANWqe2V1GHahi2ySnMjsKHvUvhDLLdizoWB0N+GhLy9k+w+F\n ddsAmK10A6ywHuEZ1JMoA==",
        "X-Received": "by 2002:a05:620a:3707:b0:8cd:b317:a0b4 with SMTP id\n af79cd13be357-8ddce0cdc56mr1162873585a.27.1775943273503;\n Sat, 11 Apr 2026 14:34:33 -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, AhmedSaid3617 <said.ahmed3617@gmail.com>",
        "Subject": "[gccrs COMMIT 1/2] Fixed glob-import all ICE",
        "Date": "Sat, 11 Apr 2026 21:34:29 +0000",
        "Message-ID": "<20260411213430.3097-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: AhmedSaid3617 <said.ahmed3617@gmail.com>\n\nModified toplevel name resolver to recognize use ::*; and use *; as valid import statements, to prevent ICE.\n\ngcc/rust/ChangeLog:\n\n\t* ast/rust-item.h:(PathType::get_glob_type): Added const qualifier to allow\n\tfunction call from const objects.\n\t* resolve/rust-forever-stack.hxx:\n\t(ForeverStack<N>::resolve_path): Check for empty segments vector and\n\treturn starting point.\n\t* resolve/rust-toplevel-name-resolver-2.0.cc (flatten_glob): Preserve the\n\topening scope resolution property of the use statement.\n\nSigned-off-by: AhmedSaid3617 <said.ahmed3617@gmail.com>\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/835795b3c00cce9183e723b8913ce49f61510f61\n\nThe commit has been mentioned in the following pull-request(s):\n - https://github.com/Rust-GCC/gccrs/pull/4498\n\n gcc/rust/ast/rust-item.h                      |  2 +-\n gcc/rust/resolve/rust-forever-stack.hxx       | 27 ++++++++++---------\n .../rust-toplevel-name-resolver-2.0.cc        |  4 ++-\n 3 files changed, 19 insertions(+), 14 deletions(-)\n\n\nbase-commit: c6a1ed545ae5e31f1b74fb5d5c26eb006a96ec9a",
    "diff": "diff --git a/gcc/rust/ast/rust-item.h b/gcc/rust/ast/rust-item.h\nindex 91c52d2cc..0724638f2 100644\n--- a/gcc/rust/ast/rust-item.h\n+++ b/gcc/rust/ast/rust-item.h\n@@ -1078,7 +1078,7 @@ public:\n \n   void accept_vis (ASTVisitor &vis) override;\n \n-  PathType get_glob_type () { return glob_type; }\n+  PathType get_glob_type () const { return glob_type; }\n \n   Kind get_kind () const override { return Glob; }\n \ndiff --git a/gcc/rust/resolve/rust-forever-stack.hxx b/gcc/rust/resolve/rust-forever-stack.hxx\nindex e8f4e8449..c7f90ae3a 100644\n--- a/gcc/rust/resolve/rust-forever-stack.hxx\n+++ b/gcc/rust/resolve/rust-forever-stack.hxx\n@@ -729,21 +729,24 @@ ForeverStack<N>::resolve_path (\n     }\n   else\n     {\n-      rust_assert (!path.get_segments ().empty ());\n+      switch (mode)\n+\t{\n+\tcase ResolutionMode::Normal:\n+\t  break; // default\n+\tcase ResolutionMode::FromRoot:\n+\t  starting_point = root;\n+\t  break;\n+\tcase ResolutionMode::FromExtern:\n+\t  starting_point = extern_prelude;\n+\t  break;\n+\tdefault:\n+\t  rust_unreachable ();\n+\t}\n     }\n \n-  switch (mode)\n+  if (path.get_segments ().empty ())\n     {\n-    case ResolutionMode::Normal:\n-      break; // default\n-    case ResolutionMode::FromRoot:\n-      starting_point = root;\n-      break;\n-    case ResolutionMode::FromExtern:\n-      starting_point = extern_prelude;\n-      break;\n-    default:\n-      rust_unreachable ();\n+      return Rib::Definition::NonShadowable (starting_point.get ().id);\n     }\n \n   auto &segments = path.get_segments ();\ndiff --git a/gcc/rust/resolve/rust-toplevel-name-resolver-2.0.cc b/gcc/rust/resolve/rust-toplevel-name-resolver-2.0.cc\nindex 630b5ab8b..84961ae2e 100644\n--- a/gcc/rust/resolve/rust-toplevel-name-resolver-2.0.cc\n+++ b/gcc/rust/resolve/rust-toplevel-name-resolver-2.0.cc\n@@ -504,7 +504,9 @@ flatten_glob (const AST::UseTreeGlob &glob, std::vector<AST::SimplePath> &paths,\n   if (glob.has_path ())\n     paths.emplace_back (glob.get_path ());\n   else\n-    paths.emplace_back (AST::SimplePath ({}, false, glob.get_locus ()));\n+    paths.emplace_back (AST::SimplePath (\n+      {}, glob.get_glob_type () == AST::UseTreeGlob::PathType::GLOBAL,\n+      glob.get_locus ()));\n }\n \n static bool\n",
    "prefixes": [
        "gccrs",
        "COMMIT",
        "1/2"
    ]
}