get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2219993,
    "url": "http://patchwork.ozlabs.org/api/patches/2219993/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/gcc/patch/adKJls2SKRnQY004@Thaum.localdomain/",
    "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": "<adKJls2SKRnQY004@Thaum.localdomain>",
    "list_archive_url": null,
    "date": "2026-04-05T16:11:02",
    "name": "c++/modules: Fix entry-point detection for recursive clusters [PR118630]",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "c1c9e3732f543c133ddab99934fa759a895840e1",
    "submitter": {
        "id": 85216,
        "url": "http://patchwork.ozlabs.org/api/people/85216/?format=api",
        "name": "Nathaniel Shead",
        "email": "nathanieloshead@gmail.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/gcc/patch/adKJls2SKRnQY004@Thaum.localdomain/mbox/",
    "series": [
        {
            "id": 498793,
            "url": "http://patchwork.ozlabs.org/api/series/498793/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/gcc/list/?series=498793",
            "date": "2026-04-05T16:11:02",
            "name": "c++/modules: Fix entry-point detection for recursive clusters [PR118630]",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/498793/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2219993/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2219993/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=o1NdanEp;\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=o1NdanEp",
            "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.216.41"
        ],
        "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 4fpcsR4jxrz1yCs\n\tfor <incoming@patchwork.ozlabs.org>; Mon, 06 Apr 2026 02:11:39 +1000 (AEST)",
            "from vm01.sourceware.org (localhost [127.0.0.1])\n\tby sourceware.org (Postfix) with ESMTP id C5B2F4BA2E1E\n\tfor <incoming@patchwork.ozlabs.org>; Sun,  5 Apr 2026 16:11:37 +0000 (GMT)",
            "from mail-pj1-f41.google.com (mail-pj1-f41.google.com\n [209.85.216.41])\n by sourceware.org (Postfix) with ESMTPS id 568814BA2E1C\n for <gcc-patches@gcc.gnu.org>; Sun,  5 Apr 2026 16:11:10 +0000 (GMT)",
            "by mail-pj1-f41.google.com with SMTP id\n 98e67ed59e1d1-35448ca4689so627539a91.0\n for <gcc-patches@gcc.gnu.org>; Sun, 05 Apr 2026 09:11:10 -0700 (PDT)",
            "from Thaum.localdomain ([163.53.146.3])\n by smtp.gmail.com with ESMTPSA id\n 41be03b00d2f7-c76c6491157sm9223384a12.9.2026.04.05.09.11.06\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Sun, 05 Apr 2026 09:11:08 -0700 (PDT)"
        ],
        "DKIM-Filter": [
            "OpenDKIM Filter v2.11.0 sourceware.org C5B2F4BA2E1E",
            "OpenDKIM Filter v2.11.0 sourceware.org 568814BA2E1C"
        ],
        "DMARC-Filter": "OpenDMARC Filter v1.4.2 sourceware.org 568814BA2E1C",
        "ARC-Filter": "OpenARC Filter v1.0.0 sourceware.org 568814BA2E1C",
        "ARC-Seal": "i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1775405470; cv=none;\n b=teZslQ+FDiN5t+8eV0jRAdYc7+emS6lZN2GBi20hf7LxaUc7Yq19QShbTi77EXONICY+Lm21zO0RxwKdEjuw/pwSUz2XsVVUO+m33z+2jLpGs7n6enrJRl/ppKUI2Dzcs1yBfDQ5EfH5hipgaXXL4ulCNBucQr/7knuSmULH5Do=",
        "ARC-Message-Signature": "i=1; a=rsa-sha256; d=sourceware.org; s=key;\n t=1775405470; c=relaxed/simple;\n bh=C/mGAXcOJRFFxXvbG1g2ecYVdEg1TdLKZAnz3VAjsyg=;\n h=DKIM-Signature:Date:From:To:Subject:Message-ID:MIME-Version;\n b=m1Ys4w3TsUJSyY3ktW1MxtKEKuegzU071YyaiqV4UxV/DcQa7ghT7MmEX0tUWCe4uGSWSihIZA+e9uhWrhPVQgMsJHxnxgj3H5VgB/uVZpgJIYk7HKrrPfx7/lmX10pUxWJutd6NXI5oCqi4vNnVpmueYu7B54124OQ6qqoVXqo=",
        "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=1775405469; x=1776010269; darn=gcc.gnu.org;\n h=content-disposition:mime-version:message-id:subject:cc:to:from:date\n :from:to:cc:subject:date:message-id:reply-to;\n bh=lhSQvhB42OUOvcE58WuT6BynyGG+R/iG7fZeeKh39XE=;\n b=o1NdanEpAnBx/8YN5dH/ZQlzE7hPo2RyM/bzjvyBpHt/b9n8duXMP/R3Upv3ERleWi\n pNEjpARHieca6FriOa/rBJL62rAlWP1rwIRqb8yq3aII8b5nGX/Ac9V2dGFkXhq9Yu48\n 6Kx4UT8zWchIJFSHcpL7UkHHwdSNlT8tJylMs2C8V6sxkYovoF8iNflQqxbu1UquFeVz\n CBd0eNNfP/yLWGCV5/2m9K3fhyOPEreEvzRcwN5ZetZZIOqnQDWZHHeUbTWDySADltRG\n 8rEhVpBYIP4SJ9KdMl5zPu/GdntgRm+iYy+1vTOGDWcNL9r7zttlgNh7ozK0/MVEocSi\n 9a+A==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20251104; t=1775405469; x=1776010269;\n h=content-disposition:mime-version:message-id:subject:cc:to:from:date\n :x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id\n :reply-to;\n bh=lhSQvhB42OUOvcE58WuT6BynyGG+R/iG7fZeeKh39XE=;\n b=VQOiASS8oWHX7yaUc7HyfpgpoLMuNSPNisAI9+b5x9Z07B3NNVVuKfPRI8Jn8NmC3J\n Ks140f3cJdnZxN61MKwgn4Iz7fZ4qNNdfaKf4wJjvxVxfTh2vIo6RpxP36xNTS8l/qZ5\n NB5oWw0RgU7ZdlJ60IqOm6oF2rxFVciwuDk65f7GV/Uexy0YiC/lyBdX3a/X+EuXyQVy\n kUgLZ4HLaiocOSqdFwjnb9FXPm6Fh+6asU1z7wa6kkHqdzAObiMqSqbhAfGw5zJA9Vaz\n evNZLMtth6aQjgJG/hohYmIOA2hxwh9oub0EwOpPv0SrPXXYT6LIcaEe5Ub8BmHLKyD9\n cGQA==",
        "X-Gm-Message-State": "AOJu0YxUSJ+J1c6SwWB81E+Ln4m1uJWB6ia+7Vu4P8lZITuIgxgZPsuS\n 9+SXRts71BawrddITZtuE/ni0C5mlsIqjZIRcvuSsPdRPZgXHsHxYFwFJzY0KA==",
        "X-Gm-Gg": "AeBDieu5/bv8NWvz+BbURXscC+pQRhpql2oWppstnPv9q8gn5IvudRlBe3nPANHT0Ur\n u+lycD40tuz2nntuqfWHeq4qotwDP3yDkzEjbKvPsSBKFtuFHya6qqw4oqxOe2OAJ0ASuw//VfA\n Zcg2lT9Pc1dn30WiWwOWXCVM2V8rymx1+9dtyymJb/zhtRthAIxWVHnDdejaQ8zKofJvl0ddJbX\n yxu2lubj9hvr7wftY0HxfEakPcje7EBtUkv6ku4x5u65ZkvE4YmdzNJSyk6gBFBhJ0w96acuiPB\n GnC9Tw19q6+LnYpLsZBB19+7QST6BfjiTSwX1qiTxNb3pg4+ap+hVc7abG+HuoXxqmnXU2vh5KG\n b8v0okmpV4sZ7GM8yq6vS3w1St3/QejCpoSWWKAtX0usKLyUUAUectCQ4fJcfoet53aTAHmt5mq\n c0XbP66MX7GxuYG9/bG0qtKMVVuTS0RFfR49DaRDWI75GL",
        "X-Received": "by 2002:a17:90b:2fc4:b0:359:8e93:4fd6 with SMTP id\n 98e67ed59e1d1-35de6971783mr5314086a91.4.1775405469164;\n Sun, 05 Apr 2026 09:11:09 -0700 (PDT)",
        "Date": "Mon, 6 Apr 2026 02:11:02 +1000",
        "From": "Nathaniel Shead <nathanieloshead@gmail.com>",
        "To": "gcc-patches@gcc.gnu.org",
        "Cc": "Jason Merrill <jason@redhat.com>",
        "Subject": "[PATCH] c++/modules: Fix entry-point detection for recursive\n clusters [PR118630]",
        "Message-ID": "<adKJls2SKRnQY004@Thaum.localdomain>",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain; charset=us-ascii",
        "Content-Disposition": "inline",
        "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": "Bootstrapped and regtested on x86_64-pc-linux-gnu, OK for trunk/15?\n\n-- >8 --\n\nIn r15-4861-g4a99443c5dd9a235022652ba0fb143c6370ea99d we added support\nto handle recursive dependency clusters, where we need to find the\n\"entry\" dependency that all other entities will hook off to ensure that\nwe stream merge keys in the correct order on read-in.\n\nThe logic I'd used to track the entry bit was not completely correct\nhowever, leading to assertion failures in 'sort_cluster' where we found\nthat entities were not marked maybe_recursive when they should have\nbeen, or multiple entities were marked as the entry point.\n\nConsider a cycle of three entities in a cluster, 'A', 'B', and 'C',\nwhere 'A' is the entry point.  By definition we walk into 'A' first, and\nfind one of the other entities, 'B'.  The old logic marked 'A' as the\nentry and 'B' as maybe-recursive; so far this is correct.\n\nBut then if we walk into 'B' and find 'C' is maybe-recursive, the old\nlogic would mark 'B' as the entry point (again!).  And likewise when we\nwalk into 'C' and find 'A'.  So we would end up with three entry points.\nSimilar issues could happen with other arrangements of dependencies.\n\nInstead, by aggressively marking everything we see as maybe-recursive,\nand only marking an entry point if nothing we see is maybe-recursive, we\navoid this issue.  We should only be able to discover these other\nentities through the entry point (A) and so this 'flood fill' behaviour\nshould ensure that all entities are correctly marked maybe-recursive,\nand only A is marked as an entry-point.\n\n\tPR c++/118630\n\ngcc/cp/ChangeLog:\n\n\t* module.cc (depset::hash::add_dependency): Correct entry point\n\tcorection for recursive clusters.\n\ngcc/testsuite/ChangeLog:\n\n\t* g++.dg/modules/late-ret-5.h: New test.\n\t* g++.dg/modules/late-ret-5_a.H: New test.\n\t* g++.dg/modules/late-ret-5_b.C: New test.\n\nSigned-off-by: Nathaniel Shead <nathanieloshead@gmail.com>\n---\n gcc/cp/module.cc                            |  5 +++--\n gcc/testsuite/g++.dg/modules/late-ret-5.h   | 16 ++++++++++++++++\n gcc/testsuite/g++.dg/modules/late-ret-5_a.H |  6 ++++++\n gcc/testsuite/g++.dg/modules/late-ret-5_b.C |  6 ++++++\n 4 files changed, 31 insertions(+), 2 deletions(-)\n create mode 100644 gcc/testsuite/g++.dg/modules/late-ret-5.h\n create mode 100644 gcc/testsuite/g++.dg/modules/late-ret-5_a.H\n create mode 100644 gcc/testsuite/g++.dg/modules/late-ret-5_b.C",
    "diff": "diff --git a/gcc/cp/module.cc b/gcc/cp/module.cc\nindex 6958388e454..5828748a3e6 100644\n--- a/gcc/cp/module.cc\n+++ b/gcc/cp/module.cc\n@@ -14855,9 +14855,10 @@ depset::hash::add_dependency (depset *dep)\n      details.  */\n   if (writing_merge_key)\n     {\n-      dep->set_flag_bit<DB_MAYBE_RECURSIVE_BIT> ();\n-      if (!current->is_maybe_recursive ())\n+      if (!dep->is_maybe_recursive () && !current->is_maybe_recursive ())\n \tcurrent->set_flag_bit<DB_ENTRY_BIT> ();\n+      dep->set_flag_bit<DB_MAYBE_RECURSIVE_BIT> ();\n+      current->set_flag_bit<DB_MAYBE_RECURSIVE_BIT> ();\n     }\n \n   if (dep->is_unreached ())\ndiff --git a/gcc/testsuite/g++.dg/modules/late-ret-5.h b/gcc/testsuite/g++.dg/modules/late-ret-5.h\nnew file mode 100644\nindex 00000000000..6f14d18e757\n--- /dev/null\n+++ b/gcc/testsuite/g++.dg/modules/late-ret-5.h\n@@ -0,0 +1,16 @@\n+// PR c++/118630\n+\n+namespace test1 {\n+  template <typename> decltype([]{}) a();\n+}\n+\n+namespace test2 {\n+  template <typename T> struct invoke_result {};\n+  template <typename T> struct foo {};\n+\n+  template <typename T>\n+  auto b(T&& arg) -> foo<invoke_result<decltype(arg)>> {\n+    invoke_result<decltype(arg)> a;\n+    return {};\n+  }\n+}\ndiff --git a/gcc/testsuite/g++.dg/modules/late-ret-5_a.H b/gcc/testsuite/g++.dg/modules/late-ret-5_a.H\nnew file mode 100644\nindex 00000000000..b39b1d4529f\n--- /dev/null\n+++ b/gcc/testsuite/g++.dg/modules/late-ret-5_a.H\n@@ -0,0 +1,6 @@\n+// PR c++/118630\n+// { dg-do compile { target c++20 } }\n+// { dg-additional-options \"-fmodule-header\" }\n+// { dg-module-cmi {} }\n+\n+#include \"late-ret-5.h\"\ndiff --git a/gcc/testsuite/g++.dg/modules/late-ret-5_b.C b/gcc/testsuite/g++.dg/modules/late-ret-5_b.C\nnew file mode 100644\nindex 00000000000..d22d7638127\n--- /dev/null\n+++ b/gcc/testsuite/g++.dg/modules/late-ret-5_b.C\n@@ -0,0 +1,6 @@\n+// PR c++/118630\n+// { dg-do compile { target c++20 } }\n+// { dg-additional-options \"-fmodules -fno-module-lazy\" }\n+\n+#include \"late-ret-5.h\"\n+import \"late-ret-5_a.H\";\n",
    "prefixes": []
}