get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2221519,
    "url": "http://patchwork.ozlabs.org/api/1.2/patches/2221519/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/gcc/patch/20260409153553.977800-2-feedabl3@gmail.com/",
    "project": {
        "id": 17,
        "url": "http://patchwork.ozlabs.org/api/1.2/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": "<20260409153553.977800-2-feedabl3@gmail.com>",
    "list_archive_url": null,
    "date": "2026-04-09T15:35:54",
    "name": "c++/reflection: ICE on member function template splicing [PR124794]",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "eeac529305525e01c1825c494db66f9817646a42",
    "submitter": {
        "id": 92146,
        "url": "http://patchwork.ozlabs.org/api/1.2/people/92146/?format=api",
        "name": "feedable",
        "email": "feedabl3@gmail.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/gcc/patch/20260409153553.977800-2-feedabl3@gmail.com/mbox/",
    "series": [
        {
            "id": 499319,
            "url": "http://patchwork.ozlabs.org/api/1.2/series/499319/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/gcc/list/?series=499319",
            "date": "2026-04-09T15:35:54",
            "name": "c++/reflection: ICE on member function template splicing [PR124794]",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/499319/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2221519/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2221519/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=qYvk/VzQ;\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 (2048-bit key,\n unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256\n header.s=20251104 header.b=qYvk/VzQ",
            "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.128.48"
        ],
        "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 4fs3vp3pBBz1xy1\n\tfor <incoming@patchwork.ozlabs.org>; Fri, 10 Apr 2026 01:37:09 +1000 (AEST)",
            "from vm01.sourceware.org (localhost [127.0.0.1])\n\tby sourceware.org (Postfix) with ESMTP id 5A3BC4BA2E2E\n\tfor <incoming@patchwork.ozlabs.org>; Thu,  9 Apr 2026 15:37:07 +0000 (GMT)",
            "from mail-wm1-f48.google.com (mail-wm1-f48.google.com\n [209.85.128.48])\n by sourceware.org (Postfix) with ESMTPS id 02FCB4BA2E19\n for <gcc-patches@gcc.gnu.org>; Thu,  9 Apr 2026 15:36:38 +0000 (GMT)",
            "by mail-wm1-f48.google.com with SMTP id\n 5b1f17b1804b1-488a041eae5so7625875e9.1\n for <gcc-patches@gcc.gnu.org>; Thu, 09 Apr 2026 08:36:38 -0700 (PDT)",
            "from 7a38 ([2a02:8308:900b:fc00::1bf9])\n by smtp.gmail.com with ESMTPSA id\n ffacd0b85a97d-43d5e969bbfsm5589795f8f.1.2026.04.09.08.36.36\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Thu, 09 Apr 2026 08:36:37 -0700 (PDT)"
        ],
        "DKIM-Filter": [
            "OpenDKIM Filter v2.11.0 sourceware.org 5A3BC4BA2E2E",
            "OpenDKIM Filter v2.11.0 sourceware.org 02FCB4BA2E19"
        ],
        "DMARC-Filter": "OpenDMARC Filter v1.4.2 sourceware.org 02FCB4BA2E19",
        "ARC-Filter": "OpenARC Filter v1.0.0 sourceware.org 02FCB4BA2E19",
        "ARC-Seal": "i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1775748999; cv=none;\n b=MVrYXTjHZEECvtllLwhq04n5THEcL2IJQK2OnFnrd/TzVR/QCPslkth/HZwWfxECyv+M/IV4XCPqZSGPqRlUS4mAYLirc0YiccA5K+GDTy78lD6R70xk62BYXMVlmXjotw4NtSOyHbuc7x+DDRSksexTe84mEgQUrSLCvoU2rXY=",
        "ARC-Message-Signature": "i=1; a=rsa-sha256; d=sourceware.org; s=key;\n t=1775748999; c=relaxed/simple;\n bh=uJ0u1F9B3kgcG6gadnhcbTjMKGgeYuqi5Ms6GgCwGVw=;\n h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version;\n b=wXJB9o+iARWND0Xq7kJ5j7RMkJzHhNZvYEgZeHk2iW3xbUC33zobY0XCJ5eFnY2sK41eaKrprWSmvkjCz5KJ5gamCKTWw/m6Zz3qnvZz6IEnbI453mKI4hRU7bl3Ktx4PRZ9rSe+3VJQiM9MpjIEAfJfoZtve16vEbii14HiqjQ=",
        "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=1775748998; x=1776353798; 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=MuRUyyHFKqjwYtYOexUJbaxUbcRdGUddBl8fy1/FZ8c=;\n b=qYvk/VzQaPOJVtr9w0lP9o51456CZwWuwCirXke79eVnLFgDMZGvIKxDJx3ISBMu9G\n 2Ozjs5VwcE0w0s9AjJLC1anR5A0YVRlFAi3YITAo/hpcUKy1EkXWvOS/XjSlVCBUTYlT\n KA0tsThQ9iAZ9vpCoKEzOrABWQkZySUQRk7EK2FwKT8x9WHXFEj5bSLp1V5J4ZGpza/X\n Tn8MIaS2ICVi8INtrj7PiZB9lynz6qsJHP5PIsfiUdGZIJiR/C+Z190EgmzV1TeGTx+F\n B8vqdR5YmF5PPsOQqSTkA5MVv6901tHlb3nbkMPNlPXpzXEFnAYU8GOWjszlLxaznnaK\n 6Zmg==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20251104; t=1775748998; x=1776353798;\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=MuRUyyHFKqjwYtYOexUJbaxUbcRdGUddBl8fy1/FZ8c=;\n b=E6k9nOD542Bq6giZAdn9D6Z5wM05GuGA4lBjoUY2Tv82UYv8ZtduHYU6B8L80YAcqj\n zZbsa5XJ9M+4v4IQ7hPhhJyaPmzYIjNzYYPVfLsKd3DFq1CfuDH0PqbJa7jilBNY+U/c\n MxvAjV+2ExaHC4WZGs/wDNd2cuH/w0DKrdp3RjyA9TqaWH5nnVFzJkUydzLWC8B3Q2ly\n NPab2Ky0G7EGXtd1NosjI60LQwK7obV0WWsHcbXz/shuOwhgLf1QF76Lr+Rr/OOvXYM5\n nz1Pwbk1c/AKqfBqJQ52E/R/em1vQnAMYnoz0cFEy2rNv76f7nAFYNd9QdWPPMSUGjCk\n v5Gg==",
        "X-Gm-Message-State": "AOJu0YyG4jI6LGdjkHyv25aqmAKAg/iw5EP/vVAOWdu0NbpFoJZg/Y2/\n i/ePbhnssFvMZykiWvlJ4heIOMX6zcgN1Pj/VRM/b685QKD+kfwGN9aVQqI+iQ==",
        "X-Gm-Gg": "AeBDievFlhUxMRdKRqbE7G7DubEOdtkMdpF0j/5C525QTzEqGu+jmFjJV0zhSyOQhi6\n kKnfIKDea57pOLS3jUr+I/arId24EmoAxINHNogjMov0V4ZLL0w4MNIA/WWvCyH+uee4vYPrr1a\n RhP8WJwnpOOByJFMNkwUnmrIw7ES+zLe8p17nY8VYhfhphfsgjfbKjaEuCGC8yxz4H9eW1Dyk8S\n epZBgakdm57RjBKIe7uZUwUU3aX3udSzyDyB38tjROn7xJ5tDKIcK4vNjTjPZpyK49MUBleKFd5\n I6yzzMESEHr6F9hpzL172LX/KQwDOemFoFAzxF32aUB/LgHjbMn5nv8x1f3Ooj+Fno7HGt+B+Mi\n 7fczl9/P86LCa7a3/xqnAk83MJ4hD4rD15KVhiGvQbiNbhASlQeXDdDLDWs1bszU0/lXt/3wOPQ\n ==",
        "X-Received": "by 2002:a05:600c:3549:b0:486:fbe1:2499 with SMTP id\n 5b1f17b1804b1-488997d2d7cmr337913365e9.22.1775748997554;\n Thu, 09 Apr 2026 08:36:37 -0700 (PDT)",
        "From": "feedable <feedabl3@gmail.com>",
        "To": "gcc-patches@gcc.gnu.org",
        "Cc": "feedable <feedabl3@gmail.com>",
        "Subject": "[PATCH] c++/reflection: ICE on member function template splicing\n [PR124794]",
        "Date": "Thu,  9 Apr 2026 18:35:54 +0300",
        "Message-ID": "<20260409153553.977800-2-feedabl3@gmail.com>",
        "X-Mailer": "git-send-email 2.53.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": "cp_parser_splice_expression isn't aware of overload sets in BASELINKs, which may\nhappen when reflecting a non-static member function template, so it treats them\nlike it would free functions.\nTo fix that we reintroduce the BASELINK to finish_id_expression, and pull the\nscope from the BASELINK.\n\nA similar issue occurs in cp_parser_splice_specifier, where additional angle\nbracket parsing gets confused by BASELINKs and decides not to parse the\nsplice-specialization-specifier.\nStrip BASELINKs for the purposes of checking and grab the data from the\nreflection for actual use.\n\n\tPR c++/124794\n\ngcc/cp/ChangeLog:\n\n\t* parser.cc (cp_parser_splice_specifier): Add handling for splicing member\n\tfunction templates\n\t(cp_parser_splice_expression): Add parsing for member function template\n\tspecializations without the \"template\" keyword\n\ngcc/testsuite/ChangeLog:\n\n\t* g++.dg/reflect/splice12.C: New test.\n---\n gcc/cp/parser.cc                        | 38 +++++++++++++++++++------\n gcc/testsuite/g++.dg/reflect/splice12.C | 34 ++++++++++++++++++++++\n 2 files changed, 63 insertions(+), 9 deletions(-)\n create mode 100644 gcc/testsuite/g++.dg/reflect/splice12.C",
    "diff": "diff --git a/gcc/cp/parser.cc b/gcc/cp/parser.cc\nindex 13b9b8f46b4..4393affe8ea 100644\n--- a/gcc/cp/parser.cc\n+++ b/gcc/cp/parser.cc\n@@ -6174,6 +6174,8 @@ cp_parser_splice_specifier (cp_parser *parser, bool template_p = false,\n   /* Get the reflected operand.  */\n   expr = splice (expr);\n \n+  tree expr_real = OVL_FIRST (MAYBE_BASELINK_FUNCTIONS (expr));\n+\n   /* If the next token is a <, it could be a splice-specialization-specifier.\n      But we need to handle \"[:r:] < 42\" where the < doesn't start a template\n      argument list.  [temp.names]/3: A < is interpreted as the delimiter of\n@@ -6185,30 +6187,33 @@ cp_parser_splice_specifier (cp_parser *parser, bool template_p = false,\n       /* As a courtesy to the user, if there is a < after a template\n \t name, parse the construct as an s-s-s and warn about the missing\n \t 'template'; it can't be anything else.  */\n-      && (template_p\n-\t  || typename_p\n-\t  || TREE_CODE (OVL_FIRST (expr)) == TEMPLATE_DECL))\n+      && (template_p || typename_p || TREE_CODE (expr_real) == TEMPLATE_DECL))\n     {\n       /* For member access splice-specialization-specifier, try to wrap\n \t non-dependent splice for function template into a BASELINK so\n \t that cp_parser_template_id can handle it.  */\n       if (object_type\n-\t  && DECL_FUNCTION_TEMPLATE_P (OVL_FIRST (expr))\n+\t  && DECL_FUNCTION_TEMPLATE_P (expr_real)\n \t  && !dependent_type_p (object_type))\n \t{\n-\t  tree scope = DECL_CONTEXT (OVL_FIRST (expr));\n+\t  tree scope = DECL_CONTEXT (expr_real);\n \t  if (scope && CLASS_TYPE_P (scope))\n \t    {\n \t      tree access_path = lookup_base (object_type, scope, ba_unique,\n \t\t\t\t\t      NULL, tf_warning_or_error);\n \t      if (access_path == error_mark_node)\n \t\texpr = error_mark_node;\n+\t      else if (BASELINK_P (expr))\n+\t\texpr  = build_baselink (access_path, BASELINK_BINFO (expr),\n+\t\t\t\t\tBASELINK_FUNCTIONS (expr),\n+\t\t\t\t\tBASELINK_OPTYPE (expr));\n \t      else\n \t\texpr\n \t\t  = build_baselink (access_path, TYPE_BINFO (object_type),\n \t\t\t\t    expr,\n-\t\t\t\t    IDENTIFIER_CONV_OP_P (OVL_NAME (expr))\n-\t\t\t\t    ? TREE_TYPE (OVL_NAME (expr)) : NULL_TREE);\n+\t\t\t\t    IDENTIFIER_CONV_OP_P (OVL_NAME (expr_real))\n+\t\t\t\t    ? TREE_TYPE (OVL_NAME (expr_real))\n+\t\t\t\t    : NULL_TREE);\n \t    }\n \t}\n       /* Let cp_parser_template_id parse the template arguments.  */\n@@ -6393,8 +6398,23 @@ cp_parser_splice_expression (cp_parser *parser, bool template_p,\n \t   constexpr auto r = ^^S::i;\n \t   int i = [: r :];\n \t we need to pass down 'S'.  */\n-      tree ctx = DECL_P (t) ? DECL_CONTEXT (t) : NULL_TREE;\n-      t = finish_id_expression (t, t, ctx, idk,\n+      tree ctx, decl;\n+      if (BASELINK_P (unresolved))\n+\t{\n+\t  /* If we have a BASELINK, grab all the data from there */\n+\t  decl = build_baselink (BASELINK_BINFO (unresolved),\n+\t\t\t\t BASELINK_ACCESS_BINFO(unresolved), t,\n+\t\t\t\t BASELINK_OPTYPE (unresolved));\n+\n+\t  ctx = BINFO_TYPE (BASELINK_BINFO (unresolved));\n+\t}\n+      else\n+\t{\n+\t  decl = t;\n+\t  ctx = DECL_P (t) ? DECL_CONTEXT (t) : NULL_TREE;\n+\t}\n+\n+      t = finish_id_expression (t, decl, ctx, idk,\n \t\t\t\t/*integral_constant_expression_p=*/false,\n \t\t\t\t/*allow_non_integral_constant_expr_p=*/true,\n \t\t\t\t&parser->non_integral_constant_expression_p,\ndiff --git a/gcc/testsuite/g++.dg/reflect/splice12.C b/gcc/testsuite/g++.dg/reflect/splice12.C\nnew file mode 100644\nindex 00000000000..bdce1da2efa\n--- /dev/null\n+++ b/gcc/testsuite/g++.dg/reflect/splice12.C\n@@ -0,0 +1,34 @@\n+// PR c++/124794\n+// { dg-do compile { target c++26 } }\n+// { dg-additional-options \"-freflection -Wno-error=missing-template-keyword\" }\n+\n+struct C { template<class T> void f(T); };\n+void (C::*p1)(int) = &template[:^^C::f:];\n+void (C::*p2)(int) = &[:^^C::f:]; // { dg-warning \"keyword before dependent template name\" }\n+void (C::*p3)(int) = &template[:^^C::f:]<int>;\n+void (C::*p4)(int) = &[:^^C::f:]<int>; // { dg-warning \"keyword before dependent template name\" }\n+auto p5 = &template[:^^C::f:]<int>;\n+auto p6 = &[:^^C::f:]<int>; // { dg-warning \"keyword before dependent template name\" }\n+\n+struct Base1{\n+  template<class T>\n+  constexpr T f(T x) {\n+    return x;\n+  }\n+};\n+struct Base2: Base1 {\n+  template<class T>\n+  constexpr T g(T x) {\n+    return x;\n+  }\n+};\n+struct Base3: Base1, Base2 {}; // { dg-warning \"inaccessible\" }\n+\n+static_assert(Base1{}.[:^^Base1::f:](13)==13); // { dg-warning \"keyword before dependent template name\" }\n+static_assert(Base1{}.[:^^Base1::f:]<int>(13)==13); // { dg-warning \"keyword before dependent template name\" }\n+static_assert(Base3{}.[:^^Base2::g:](13)==13); // { dg-warning \"keyword before dependent template name\" }\n+static_assert(Base3{}.[:^^Base2::g:]<int>(13)==13); // { dg-warning \"keyword before dependent template name\" }\n+constexpr int invalid1 = Base3{}.[:^^Base2::f:]; // { dg-error \"cannot resolve overloaded function\" }\n+// { dg-warning \"keyword before dependent template name\" \"\" { target *-*-* } .-1 }\n+constexpr int invalid2 = Base3{}.[:^^Base1::f:]; // { dg-error \"cannot resolve overloaded function\" }\n+// { dg-warning \"keyword before dependent template name\" \"\" { target *-*-* } .-1 }\n",
    "prefixes": []
}