get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2231549,
    "url": "http://patchwork.ozlabs.org/api/1.1/patches/2231549/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/gcc/patch/20260430203447.3995696-1-ppalka@redhat.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": "<20260430203447.3995696-1-ppalka@redhat.com>",
    "date": "2026-04-30T20:34:47",
    "name": "c++/modules: merging fndecl w/ inst noexcept + deduced auto [PR125115]",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "f8d44ece022bf1e8d806d45b02bef507ae2d4ba7",
    "submitter": {
        "id": 78319,
        "url": "http://patchwork.ozlabs.org/api/1.1/people/78319/?format=api",
        "name": "Patrick Palka",
        "email": "ppalka@redhat.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/gcc/patch/20260430203447.3995696-1-ppalka@redhat.com/mbox/",
    "series": [
        {
            "id": 502379,
            "url": "http://patchwork.ozlabs.org/api/1.1/series/502379/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/gcc/list/?series=502379",
            "date": "2026-04-30T20:34:47",
            "name": "c++/modules: merging fndecl w/ inst noexcept + deduced auto [PR125115]",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/502379/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2231549/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2231549/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 (1024-bit key;\n unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256\n header.s=mimecast20190719 header.b=A47TWRLR;\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 (1024-bit key,\n unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256\n header.s=mimecast20190719 header.b=A47TWRLR",
            "sourceware.org; dmarc=pass (p=quarantine dis=none)\n header.from=redhat.com",
            "sourceware.org; spf=pass smtp.mailfrom=redhat.com",
            "server2.sourceware.org;\n arc=none smtp.remote-ip=170.10.129.124"
        ],
        "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 4g65XG6Ntyz1yHZ\n\tfor <incoming@patchwork.ozlabs.org>; Fri, 01 May 2026 06:35:25 +1000 (AEST)",
            "from vm01.sourceware.org (localhost [127.0.0.1])\n\tby sourceware.org (Postfix) with ESMTP id D876E42D3773\n\tfor <incoming@patchwork.ozlabs.org>; Thu, 30 Apr 2026 20:35:22 +0000 (GMT)",
            "from us-smtp-delivery-124.mimecast.com\n (us-smtp-delivery-124.mimecast.com [170.10.129.124])\n by sourceware.org (Postfix) with ESMTP id 46E5D4099F84\n for <gcc-patches@gcc.gnu.org>; Thu, 30 Apr 2026 20:34:53 +0000 (GMT)",
            "from mail-qt1-f200.google.com (mail-qt1-f200.google.com\n [209.85.160.200]) by relay.mimecast.com with ESMTP with STARTTLS\n (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id\n us-mta-441-p8LF5-SpNXCZj3LxeAfcZw-1; Thu, 30 Apr 2026 16:34:51 -0400",
            "by mail-qt1-f200.google.com with SMTP id\n d75a77b69052e-50faec938fcso3092801cf.3\n for <gcc-patches@gcc.gnu.org>; Thu, 30 Apr 2026 13:34:51 -0700 (PDT)",
            "from idea ([2600:4040:aa66:bf00:9e8e:99ff:fed1:71f])\n by smtp.gmail.com with ESMTPSA id\n d75a77b69052e-5103e543a9bsm800241cf.19.2026.04.30.13.34.48\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Thu, 30 Apr 2026 13:34:48 -0700 (PDT)"
        ],
        "DKIM-Filter": [
            "OpenDKIM Filter v2.11.0 sourceware.org D876E42D3773",
            "OpenDKIM Filter v2.11.0 sourceware.org 46E5D4099F84"
        ],
        "DMARC-Filter": "OpenDMARC Filter v1.4.2 sourceware.org 46E5D4099F84",
        "ARC-Filter": "OpenARC Filter v1.0.0 sourceware.org 46E5D4099F84",
        "ARC-Seal": "i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1777581293; cv=none;\n b=E73nDgp1EGKSFukfssDynIVhZBb2HlbSkDhuz9tRS0GNcrL6icTmAGd4d7pI5JoiIgAu2iekCRLLhA8jyeyJJ0xPRvh5EKefnnexl3uvnHMmgkD2Gb1auaz1rwK29M5QLtmMHNtkncZfuP9MFuUPyNMXqdtFK4zLcwUSaiFndi0=",
        "ARC-Message-Signature": "i=1; a=rsa-sha256; d=sourceware.org; s=key;\n t=1777581293; c=relaxed/simple;\n bh=DvYSL8RNJDhvi9+KadD/SaWjOihsFgHqByqzMZWPknY=;\n h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version;\n b=Shq4bjxGk83VURW0KVt72bluJ1PkqJJw4wBjj4ocBRsiiYKGs376M/Vdo0y08Xo+wJkDhg6IfKa3Qk3cWCmrhUjGkw2dRuQF2Pw4LTkIZlmopifgnIOA37xfMHG0NLF8WjG7FhasXdndADEOAKXI9xfhXGhomrtcawLXcuAxeYQ=",
        "ARC-Authentication-Results": "i=1; server2.sourceware.org",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n s=mimecast20190719; t=1777581292;\n h=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n to:to:cc:cc:mime-version:mime-version:content-type:content-type:\n content-transfer-encoding:content-transfer-encoding;\n bh=JzEDvC50TeKgorv1vY4ucIxGfuGId3thPxW577W17Ls=;\n b=A47TWRLRLzYiHYLaY9O+sejG+DGTfn5gDZaakhF+DZ4DSrbKc9LKFffOScMq01ZHm1xr53\n eF4FV6VWh+Y7wTFD+tYtzud4ghek+v/3FyqKJl51fST3nJLxQuxWH8tLbWIpw+IzCUCsuz\n QCesUFyfQV725VKnSU6N/8eIZHCEEsI=",
        "X-MC-Unique": "p8LF5-SpNXCZj3LxeAfcZw-1",
        "X-Mimecast-MFC-AGG-ID": "p8LF5-SpNXCZj3LxeAfcZw_1777581291",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20251104; t=1777581290; x=1778186090;\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=JzEDvC50TeKgorv1vY4ucIxGfuGId3thPxW577W17Ls=;\n b=QhI9khcV34i1RPmIzrVvKjMBQP+IftszX2xu1t9YR1clt561FXgm2s0F6M1WO+pvxf\n RuZuVTpRjHqQ32Yc877SfYTIxtuaaSNV+d35mxDQH3R43ZLcs8DjiWJfB6iugKPZZfan\n 7egbUieZXXm+37eZLnfdurU6eqr5LV8uQZFcjP3QeHa88fkCml9pMxMO4JrHP6DucXBR\n rbNDxxKSmAcK2k9DdDTEZVXKSXsmMY3REjr/DKBooUZqTPr1XAG6MU6T262qxI2RabX7\n s4XW+/WUo7jF7FULj5kFdDEkkNjiiVkR8o71LKabnq/H75FcMf4YtTZB+0orohyNu+5O\n C+wQ==",
        "X-Gm-Message-State": "AOJu0YxTnOi9i73DFwupCa1xLOetAocyNsY3aMgB/hfi2ImfWNbjiVpQ\n mGe8Oxx2Kf6QMY1vtiuJlIz5/WcgK70tFNfiGA+koIcc+6TYISndEc55OJZGdN9tQgvY8YCCq78\n 82zweBlrApwCzatjy1RDj4biGt/3x5Po7eVp0rAkVR3XbAJ68FWfK9UIE/CEztWg0WGOcWhXWXe\n PkulPH7ySSQYR58r2rXQYTH6s3i/Q4KBDQllp8hyoI",
        "X-Gm-Gg": "AeBDievi/DOge7PSipNfSr83khanQjXVAr+72At6moXzySC8gUHaaILprfNzNsga8YF\n 4EAT+IlWj7CTxidzjpi/MttSdCW7iOV2Hgs9T7wY90ocYWzMc2Ep1xm/PS83MYhbw/S3pWV3LjM\n hMBLMQwCIvlA+iaBAtxnK7lyzLFf9khEWIl4mX0qPATshWaryqbfv5hlAruzQPJEJE8iv5MSeeD\n FnsboPFB4545F9hQm8FAnpRUhuJJIScYIqSFwe8c7Prw3GMe0xpPAA4eWUE1gLonEloG0d02GDY\n Fe7+NvKpw8c2RVaTwt654dyTT76jBRYi9kX+pCBkA5zoOBmTxcrGauHM3F5deMbnTwt1OKbK/35\n XDDlwfs2xvSGtEK3UaTZpQj8=",
        "X-Received": [
            "by 2002:ac8:5d45:0:b0:50b:2875:5782 with SMTP id\n d75a77b69052e-5102ae5dc40mr43091771cf.6.1777581290150;\n Thu, 30 Apr 2026 13:34:50 -0700 (PDT)",
            "by 2002:ac8:5d45:0:b0:50b:2875:5782 with SMTP id\n d75a77b69052e-5102ae5dc40mr43091391cf.6.1777581289652;\n Thu, 30 Apr 2026 13:34:49 -0700 (PDT)"
        ],
        "From": "Patrick Palka <ppalka@redhat.com>",
        "To": "gcc-patches@gcc.gnu.org",
        "Cc": "jason@redhat.com,\n\tPatrick Palka <ppalka@redhat.com>",
        "Subject": "[PATCH] c++/modules: merging fndecl w/ inst noexcept + deduced auto\n [PR125115]",
        "Date": "Thu, 30 Apr 2026 16:34:47 -0400",
        "Message-ID": "<20260430203447.3995696-1-ppalka@redhat.com>",
        "X-Mailer": "git-send-email 2.54.0.rc1.54.g60f07c4f5c",
        "MIME-Version": "1.0",
        "X-Mimecast-Spam-Score": "0",
        "X-Mimecast-MFC-PROC-ID": "H4zG8IivestGO1KNs4qq-AaiaIN0Kj2UqKbDgQ_WUX4_1777581291",
        "X-Mimecast-Originator": "redhat.com",
        "Content-Transfer-Encoding": "8bit",
        "content-type": "text/plain; charset=\"US-ASCII\"; x-default=true",
        "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": "Tested on x86_64-pc-linux-gnu, does this look OK for trunk/16?\n\n-- >8 --\n\nHere when streaming in view_interface<int>::data() and merging it with\nthe in-TU version, we find that the streamed-in version already has\nits noexcept instantiated and its return type deduced.  is_matching_decl\nhas logic to update the in-TU version when that is the case, first by\npropagating the instantiated noexcept and then the deduced return type.\nBut the noexcept propagation is done by overwriting the entire function\ntype with the streamed-in one, which simultaneously updates the return\ntype as well.  This premature return type updating breaks the later\ndeduced return type checks which are partially in terms of the original\nfunction type.\n\nThis patch fixes this by propagating the instantiated noexcept more\nnarrowly via build_exception_variant.  Also turn e_type and d_type into\nreferences so that they're not stale after TREE_TYPE updating.\n\n\tPR c++/125115\n\ngcc/cp/ChangeLog:\n\n\t* module.cc (trees_in::is_matching_decl): Turn e_type and d_type\n\tinto references.  Propagate instantiated noexcept via\n\tbuild_exception_variant instead of using d_type.\n\ngcc/testsuite/ChangeLog:\n\n\t* g++.dg/modules/auto-9_a.H: New test.\n\t* g++.dg/modules/auto-9_b.C: New test.\n\t* g++.dg/modules/auto-9_c.C: New test.\n---\n gcc/cp/module.cc                        |  7 ++--\n gcc/testsuite/g++.dg/modules/auto-9_a.H | 46 +++++++++++++++++++++++++\n gcc/testsuite/g++.dg/modules/auto-9_b.C | 11 ++++++\n gcc/testsuite/g++.dg/modules/auto-9_c.C | 10 ++++++\n 4 files changed, 71 insertions(+), 3 deletions(-)\n create mode 100644 gcc/testsuite/g++.dg/modules/auto-9_a.H\n create mode 100644 gcc/testsuite/g++.dg/modules/auto-9_b.C\n create mode 100644 gcc/testsuite/g++.dg/modules/auto-9_c.C",
    "diff": "diff --git a/gcc/cp/module.cc b/gcc/cp/module.cc\nindex dc9981a5fc24..afd272209c83 100644\n--- a/gcc/cp/module.cc\n+++ b/gcc/cp/module.cc\n@@ -12633,8 +12633,8 @@ trees_in::is_matching_decl (tree existing, tree decl, bool is_typedef)\n \t  goto mismatch;\n \t}\n \n-      tree e_type = TREE_TYPE (e_inner);\n-      tree d_type = TREE_TYPE (d_inner);\n+      tree& e_type = TREE_TYPE (e_inner);\n+      tree& d_type = TREE_TYPE (d_inner);\n \n       for (tree e_args = TYPE_ARG_TYPES (e_type),\n \t     d_args = TYPE_ARG_TYPES (d_type);\n@@ -12672,7 +12672,8 @@ trees_in::is_matching_decl (tree existing, tree decl, bool is_typedef)\n \t      dump (dumper::MERGE)\n \t\t&& dump (\"Propagating instantiated noexcept to %N\", existing);\n \t      gcc_checking_assert (existing == e_inner);\n-\t      TREE_TYPE (existing) = d_type;\n+\t      TREE_TYPE (existing)\n+\t\t= build_exception_variant (TREE_TYPE (existing), d_spec);\n \n \t      /* Propagate to existing clones.  */\n \t      tree clone;\ndiff --git a/gcc/testsuite/g++.dg/modules/auto-9_a.H b/gcc/testsuite/g++.dg/modules/auto-9_a.H\nnew file mode 100644\nindex 000000000000..63b59e25ce1b\n--- /dev/null\n+++ b/gcc/testsuite/g++.dg/modules/auto-9_a.H\n@@ -0,0 +1,46 @@\n+// PR c++/125115\n+// { dg-do compile { target c++17 } }\n+// { dg-additional-options \"-fmodule-header\" }\n+\n+namespace ranges {\n+struct _Begin {\n+  template <typename _Tp> auto operator()(_Tp __t) { return __t.begin(); }\n+};\n+struct _Data {\n+  template <typename _Tp> auto operator()(_Tp __t) { return __t.data(); }\n+};\n+inline _Begin begin;\n+inline _Data data;\n+struct subrange;\n+template <typename _Tp> struct view_interface {\n+  subrange _M_derived();\n+  auto data() noexcept(noexcept(begin(_M_derived()))) { return begin(_M_derived()); }\n+};\n+} // namespace ranges\n+struct basic_string_view {\n+  basic_string_view(const char *);\n+  template <typename _Range>\n+  basic_string_view(_Range __r) : _M_str(ranges::data(__r)) {}\n+  char *_M_str;\n+} typedef string_view;\n+namespace ranges {\n+struct subrange : view_interface<int> {\n+  char *begin();\n+};\n+struct split_view {\n+  struct _Iterator {\n+    subrange operator*();\n+  };\n+  template <typename _Range> split_view(_Range, _Range);\n+  _Iterator begin();\n+};\n+namespace views {\n+inline\n+struct _Split {\n+  template <typename _Range, typename _Pattern>\n+  auto operator()(_Range, _Pattern) {\n+    return split_view(0, 0);\n+  }\n+} split;\n+} // namespace views\n+} // namespace ranges\ndiff --git a/gcc/testsuite/g++.dg/modules/auto-9_b.C b/gcc/testsuite/g++.dg/modules/auto-9_b.C\nnew file mode 100644\nindex 000000000000..dcb05a6c57aa\n--- /dev/null\n+++ b/gcc/testsuite/g++.dg/modules/auto-9_b.C\n@@ -0,0 +1,11 @@\n+// PR c++/125115\n+// { dg-do compile { target c++17 } }\n+// { dg-additional-options \"-fmodules\" }\n+\n+export module M; // { dg-module-cmi M }\n+import \"auto-9_a.H\";\n+\n+export\n+inline void foo() {\n+  auto x = string_view(*ranges::views::split(string_view(\"1.2\"), '.').begin());\n+}\ndiff --git a/gcc/testsuite/g++.dg/modules/auto-9_c.C b/gcc/testsuite/g++.dg/modules/auto-9_c.C\nnew file mode 100644\nindex 000000000000..dde902b8f95c\n--- /dev/null\n+++ b/gcc/testsuite/g++.dg/modules/auto-9_c.C\n@@ -0,0 +1,10 @@\n+// PR c++/125115\n+// { dg-do compile { target c++17 } }\n+// { dg-additional-options \"-fmodules\" }\n+\n+#include \"auto-9_a.H\"\n+import M;\n+\n+int main() {\n+  foo();\n+}\n",
    "prefixes": []
}