get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2226950,
    "url": "http://patchwork.ozlabs.org/api/patches/2226950/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/gcc/patch/20260422201916.965877-1-ppalka@redhat.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": "<20260422201916.965877-1-ppalka@redhat.com>",
    "list_archive_url": null,
    "date": "2026-04-22T20:19:16",
    "name": "c++/modules: PTRMEM_CST member considered unused [PR124981]",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "0f0d0667b5a644a8ff02f65212abf5971f954b88",
    "submitter": {
        "id": 78319,
        "url": "http://patchwork.ozlabs.org/api/people/78319/?format=api",
        "name": "Patrick Palka",
        "email": "ppalka@redhat.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/gcc/patch/20260422201916.965877-1-ppalka@redhat.com/mbox/",
    "series": [
        {
            "id": 501119,
            "url": "http://patchwork.ozlabs.org/api/series/501119/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/gcc/list/?series=501119",
            "date": "2026-04-22T20:19:16",
            "name": "c++/modules: PTRMEM_CST member considered unused [PR124981]",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/501119/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2226950/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2226950/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 (1024-bit key;\n unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256\n header.s=mimecast20190719 header.b=hqWEqG1W;\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=hqWEqG1W",
            "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 4g1CjJ0wDTz1yHy\n\tfor <incoming@patchwork.ozlabs.org>; Thu, 23 Apr 2026 07:56:20 +1000 (AEST)",
            "from vm01.sourceware.org (localhost [127.0.0.1])\n\tby sourceware.org (Postfix) with ESMTP id 364944BABF18\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 22 Apr 2026 21:56:18 +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 5055B4C3F188\n for <gcc-patches@gcc.gnu.org>; Wed, 22 Apr 2026 20:19:26 +0000 (GMT)",
            "from mail-qk1-f198.google.com (mail-qk1-f198.google.com\n [209.85.222.198]) by relay.mimecast.com with ESMTP with STARTTLS\n (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id\n us-mta-479-4s6daKjfNZSXGdsvrGLekg-1; Wed, 22 Apr 2026 16:19:23 -0400",
            "by mail-qk1-f198.google.com with SMTP id\n af79cd13be357-8eab57f0e8bso79954085a.0\n for <gcc-patches@gcc.gnu.org>; Wed, 22 Apr 2026 13:19:23 -0700 (PDT)",
            "from idea ([2600:4040:aa66:bf00:9e8e:99ff:fed1:71f])\n by smtp.gmail.com with ESMTPSA id\n af79cd13be357-8eb1923abc6sm893143685a.6.2026.04.22.13.19.20\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Wed, 22 Apr 2026 13:19:21 -0700 (PDT)"
        ],
        "DKIM-Filter": [
            "OpenDKIM Filter v2.11.0 sourceware.org 364944BABF18",
            "OpenDKIM Filter v2.11.0 sourceware.org 5055B4C3F188"
        ],
        "DMARC-Filter": "OpenDMARC Filter v1.4.2 sourceware.org 5055B4C3F188",
        "ARC-Filter": "OpenARC Filter v1.0.0 sourceware.org 5055B4C3F188",
        "ARC-Seal": "i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1776889166; cv=none;\n b=B6nuIIlOQui/3vhYr9mYA+RoNouNW/jtLUUOaTDI2W5sgZxHJEA/9Nb4YxkKlUT6pU65P6omsOPCKL7Y+pDYCtKWjSg35hr1WaAF9QaWa+osdgrFCqTqaSyEFSsb1izZbU8bKWEsLliuqfC9HUFc5gWj8Y8SV4vGAzR9Dwcmn+I=",
        "ARC-Message-Signature": "i=1; a=rsa-sha256; d=sourceware.org; s=key;\n t=1776889166; c=relaxed/simple;\n bh=WxNQc+2hQs/4BZoekoe2QbQA9LJhsYe5P9bl8mK+Ce4=;\n h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version;\n b=mgHD0XrCeyiWGYjLwGXL6smTgQa+G4yosTqyZu2xiy93yl44UDiKiHgj8hS356MfEzkL6OcuhT9nwr4ZYC+EuaU5XITtc6qu/FU4zN28tVsreiEelX6RhkjWpbRn740vZO5ph2ke04okldNEwIleCwpdFKbdp3nbmy3ne3sUsEQ=",
        "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=1776889165;\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=u7+4+p4UNgQtIaagTKnttlnVw/8cS/Qn3L00Ij2QVew=;\n b=hqWEqG1W+vlyzJcL2rrAKlyzIYiCR4z3Inn5O+cz3eREgTRPZxiIpVmyK1/tHwzV67F6ri\n Jz6Vp4PD6bzihagAJ0tbAlvHg6kNQzLu7ncfQsRvzy+acIgmrkuDiCcKYip3nOo/E3+N90\n 5B8DBWWIhxCv6UaiN813rZNwVH0316M=",
        "X-MC-Unique": "4s6daKjfNZSXGdsvrGLekg-1",
        "X-Mimecast-MFC-AGG-ID": "4s6daKjfNZSXGdsvrGLekg_1776889163",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20251104; t=1776889163; x=1777493963;\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=u7+4+p4UNgQtIaagTKnttlnVw/8cS/Qn3L00Ij2QVew=;\n b=eFyMLtzWPS9zoeB5xIgSP3EUSJtGypiEnGnrXLHllqiYGcr3uH/tOYM1TRJ/J/9Oe3\n x1s8Ea2ResSUKcKSRbwFbLBu6cfPUQgL2/ItpbKHZoLvOSybDUQqn43sh5sIruuPoGbW\n AeCMBciypG/ktORIIXaQh8ctT+OOt2kFs5ZqHfZ0xL8/0JzPq4PvIsBNwpIs7w+DyfGt\n lPB6KvAoUVb2hasJ2+sE9jT0M0ye95c4JmJ8mQCGJuodj5xnGEyzDQDI2ly9y3YtJZnD\n 0q21a+3rkD16I8ixsgrZBbybms6ymhxbivywiFR86ymovlEApOJ8FVRhwpcEJ18SZavC\n boBQ==",
        "X-Gm-Message-State": "AOJu0YzIEe3rtkIwOiu1JnEdQbku5ynXNchE4NMPez5VEwWASspdDM6b\n 6X1fa6CWypRqsG+FqsvIClCFewqFWMpYGsw72ImcQ0z/2hWNM8/GlK0XjZ3NXnvnHz03mlXd4F9\n i229QEW7WfHoV7D2kSXh34d8T07W8z5XgWBHKU/bvfvaLIQ3wiSNoAXXM4xTX9Qq1oDqAyiNxkl\n lSQ+riEQQqeh/FP3BRfEJWB7KP/jYGl8qluJHJH8je",
        "X-Gm-Gg": "AeBDieupcrGC6zv6H5dJXrZyv1c8BjU8tNIZoAJpIEjcHXnR5RSmw5abW1aCTbTxXqk\n nRCIjA0OTaIIHEh6lYb8sBEtx0Hnhj80CiJHtv4PtBKxwJMAh2IrIWwKGQhwVuNrvjWR/sRuydk\n r2UX08AkCqYEYeVSIW4FyNHmi8SEa2EqTfIYOyiA7NheMeHyIN3Nt9+Ts8K/lAN446D4XF9pbbq\n wvaHAMENMaLveWZF2AP8Iano91A/XcIUiA8iHgkbSMq6LaOXNPSJUc+0VSoMTf1is9J03gB9tjN\n /6AnSyAH8pjxfyi/fFr51x2I/1HjFEAVqt6pyNCkqaia/+9xjrlVd3uHCILwa1daaRfgPE+rZl6\n sRkyJFGcxAMI/JIJESg7WG6Y=",
        "X-Received": [
            "by 2002:a05:620a:7007:b0:8ee:e440:fae2 with SMTP id\n af79cd13be357-8eee440ff92mr720431585a.5.1776889162574;\n Wed, 22 Apr 2026 13:19:22 -0700 (PDT)",
            "by 2002:a05:620a:7007:b0:8ee:e440:fae2 with SMTP id\n af79cd13be357-8eee440ff92mr720426585a.5.1776889161826;\n Wed, 22 Apr 2026 13:19:21 -0700 (PDT)"
        ],
        "From": "Patrick Palka <ppalka@redhat.com>",
        "To": "gcc-patches@gcc.gnu.org",
        "Cc": "libstdc++@gcc.gnu.org, jason@redhat.com, nshead@gcc.gnu.org,\n Patrick Palka <ppalka@redhat.com>",
        "Subject": "[PATCH] c++/modules: PTRMEM_CST member considered unused [PR124981]",
        "Date": "Wed, 22 Apr 2026 16:19:16 -0400",
        "Message-ID": "<20260422201916.965877-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": "BHV8NB9hfxel_eJocxBftWf3YoWP_JdIHJrg9bmGjHw_1776889163",
        "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 17/16.2?\n\n-- >8 --\n\nHere from the importer side the specialization A<B, &B::g> has already\nbeen instantiated in module M, so we stream it in rather than\ninstantiate it.  We then proceed to instantiate A<B, &B::g>::f() whose\ndefinition invokes the pointer-to-member &B::g, clearly a use, but it\nturns out that nothing has marked B::g as used in _b.C and we complain\nat link time about an undefined reference.\n\nWithout modules we would have marked B::g as used during instantiation\nof A<B, &B::g> via mark_template_arguments_used.  But this instantiaton\nhappens in module M, not the importer.\n\nThis patch fixes this by force setting TREE_USED on PTRMEM_CST_MEMBER\nduring stream-in, via the RTU macro, which seems sufficient to ensure\nB::g gets emitted.  I don't fully understand the reason for this RTU macro\nbut it's already used for streaming in operands of tcc_expression nodes\nand BASELINK_FUNCTIONS so using it for PTRMEM_CST_MEMBER doesn't seem too\nout of place.\n\n\tPR c++/124981\n\ngcc/cp/ChangeLog:\n\n\t* module.cc (trees_in::core_vals) <case PTRMEM_CST>: Use RTU\n\tinstead of RT to stream PTRMEM_CST_MEMBER.\n\ngcc/testsuite/ChangeLog:\n\n\t* g++.dg/modules/ptrmem-1_a.C: New test.\n\t* g++.dg/modules/ptrmem-1_b.C: New test.\n---\n gcc/cp/module.cc                          |  2 +-\n gcc/testsuite/g++.dg/modules/ptrmem-1_a.C | 21 +++++++++++++++++++++\n gcc/testsuite/g++.dg/modules/ptrmem-1_b.C | 10 ++++++++++\n 3 files changed, 32 insertions(+), 1 deletion(-)\n create mode 100644 gcc/testsuite/g++.dg/modules/ptrmem-1_a.C\n create mode 100644 gcc/testsuite/g++.dg/modules/ptrmem-1_b.C",
    "diff": "diff --git a/gcc/cp/module.cc b/gcc/cp/module.cc\nindex e5547f7d029f..61e9e70936bd 100644\n--- a/gcc/cp/module.cc\n+++ b/gcc/cp/module.cc\n@@ -7443,7 +7443,7 @@ trees_in::core_vals (tree t)\n       break;\n \n     case PTRMEM_CST:\n-      RT (((lang_tree_node *)t)->ptrmem.member);\n+      RTU (((lang_tree_node *)t)->ptrmem.member);\n       break;\n \n     case STATIC_ASSERT:\ndiff --git a/gcc/testsuite/g++.dg/modules/ptrmem-1_a.C b/gcc/testsuite/g++.dg/modules/ptrmem-1_a.C\nnew file mode 100644\nindex 000000000000..ca16c39bea3b\n--- /dev/null\n+++ b/gcc/testsuite/g++.dg/modules/ptrmem-1_a.C\n@@ -0,0 +1,21 @@\n+// PR c++/124981\n+// { dg-additional-options \"-fmodules\" }\n+// { dg-module-cmi M }\n+\n+export module M;\n+\n+template<class T, void (T::*F)() const>\n+struct A {\n+  void f(const T& t) {\n+    (t.*F)();\n+  }\n+};\n+\n+export\n+template<class T>\n+struct B {\n+  void g() const { }\n+  A<B, &B::g> m;\n+};\n+\n+B<void> b;\ndiff --git a/gcc/testsuite/g++.dg/modules/ptrmem-1_b.C b/gcc/testsuite/g++.dg/modules/ptrmem-1_b.C\nnew file mode 100644\nindex 000000000000..5c65bfc1fb10\n--- /dev/null\n+++ b/gcc/testsuite/g++.dg/modules/ptrmem-1_b.C\n@@ -0,0 +1,10 @@\n+// PR c++/124981\n+// { dg-additional-options \"-fmodules\" }\n+// { dg-module-do link }\n+\n+import M;\n+\n+int main() {\n+  B<void> b;\n+  b.m.f(b);\n+}\n",
    "prefixes": []
}