[{"id":3678194,"web_url":"http://patchwork.ozlabs.org/comment/3678194/","msgid":"<ff7f00c1-210c-c679-577b-9a9e75710eeb@idea>","list_archive_url":null,"date":"2026-04-16T13:51:28","subject":"Re: [PATCH v2] c++/reflection: ICE on member function template\n splicing [PR124794]","submitter":{"id":78319,"url":"http://patchwork.ozlabs.org/api/people/78319/","name":"Patrick Palka","email":"ppalka@redhat.com"},"content":"Hi, Thanks for the revised patch!\n\nOn Thu, 9 Apr 2026, feedable wrote:\n\n> cp_parser_splice_expression is stripping BASELINKs before resolving the expr;\n> checks if the result is a BASELINK after that (by which point it never is).\n> To fix it, we strip the BASELINK only after resolving and only for checks\n> (where applicable).\n> \n> In cp_parser_splice_specifier, the additional template param parsing fails to\n> detect that the reflection is a template if it's wrapped in a BASELINKs, and\n> decides not to parse the splice-specialization-specifier if the 'template'\n> keyword is missing.\n> Strip BASELINKs for the purposes of checking and grab the data from the\n> reflection for actual use.\n> \n> \tPR c++/124794\n> \n> gcc/cp/ChangeLog:\n> \n> \t* parser.cc (cp_parser_splice_specifier): Do not strip BASELINKs\n> \t(cp_parser_splice_expression): Add parsing for member function template\n> \tspecializations without the \"template\" keyword\n> \n> gcc/testsuite/ChangeLog:\n> \n> \t* g++.dg/reflect/splice12.C: New test.\n\nSorry for the possibly redundant question, but do you have copyright\nassignment with the FSF or are you contributing via DCO\n(https://gcc.gnu.org/dco.html)?\n\nBesides that your patch seems reasonable to me but I'm not very familar\nwith the reflection code, deferring to Marek or Jason for proper view.\n\n> ---\n>  gcc/cp/parser.cc                        | 24 +++++++++--------\n>  gcc/testsuite/g++.dg/reflect/splice12.C | 34 +++++++++++++++++++++++++\n>  2 files changed, 48 insertions(+), 10 deletions(-)\n>  create mode 100644 gcc/testsuite/g++.dg/reflect/splice12.C\n> \n> diff --git a/gcc/cp/parser.cc b/gcc/cp/parser.cc\n> index fe27a15a283..ea89847116d 100644\n> --- a/gcc/cp/parser.cc\n> +++ b/gcc/cp/parser.cc\n> @@ -6179,6 +6179,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 = maybe_get_first_fn (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> @@ -6190,30 +6192,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> @@ -6310,7 +6315,6 @@ cp_parser_splice_expression (cp_parser *parser, bool template_p,\n>    tree t = expr.get_value ();\n>    STRIP_ANY_LOCATION_WRAPPER (t);\n>    tree unresolved = t;\n> -  t = MAYBE_BASELINK_FUNCTIONS (t);\n>    t = resolve_nondeduced_context (t, tf_warning_or_error);\n>  \n>    if (dependent_splice_p (t))\n> @@ -6331,8 +6335,8 @@ cp_parser_splice_expression (cp_parser *parser, bool template_p,\n>      }\n>  \n>    /* Make sure this splice-expression produces an expression.  */\n> -  if (!check_splice_expr (loc, expr.get_start (), t, address_p,\n> -\t\t\t  member_access_p, template_p, targs_p,\n> +  if (!check_splice_expr (loc, expr.get_start (), MAYBE_BASELINK_FUNCTIONS (t),\n> +                          address_p, member_access_p, template_p, targs_p,\n>  \t\t\t  /*complain=*/true))\n>      return error_mark_node;\n>  \n> diff --git a/gcc/testsuite/g++.dg/reflect/splice12.C b/gcc/testsuite/g++.dg/reflect/splice12.C\n> new file mode 100644\n> index 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> -- \n> 2.53.0\n> \n>","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=iYM8PIBw;\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 (1024-bit key,\n unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256\n header.s=mimecast20190719 header.b=iYM8PIBw","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.133.124"],"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 4fxKFG6Rc6z1yCv\n\tfor <incoming@patchwork.ozlabs.org>; Thu, 16 Apr 2026 23:52:02 +1000 (AEST)","from vm01.sourceware.org (localhost [127.0.0.1])\n\tby sourceware.org (Postfix) with ESMTP id D27364BA9028\n\tfor <incoming@patchwork.ozlabs.org>; Thu, 16 Apr 2026 13:52:00 +0000 (GMT)","from us-smtp-delivery-124.mimecast.com\n (us-smtp-delivery-124.mimecast.com [170.10.133.124])\n by sourceware.org (Postfix) with ESMTP id E586A4BA23F4\n for <gcc-patches@gcc.gnu.org>; Thu, 16 Apr 2026 13:51:32 +0000 (GMT)","from mail-qv1-f70.google.com (mail-qv1-f70.google.com\n [209.85.219.70]) by relay.mimecast.com with ESMTP with STARTTLS\n (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id\n us-mta-20-V8JPJC4sOPuNP4Og-C0lrw-1; Thu, 16 Apr 2026 09:51:31 -0400","by mail-qv1-f70.google.com with SMTP id\n 6a1803df08f44-8954b9b5da7so25549036d6.2\n for <gcc-patches@gcc.gnu.org>; Thu, 16 Apr 2026 06:51:31 -0700 (PDT)","from [2600:4040:aa66:bf00:9e8e:99ff:fed1:71f]\n ([2600:4040:aa66:bf00:9e8e:99ff:fed1:71f])\n by smtp.gmail.com with ESMTPSA id\n 6a1803df08f44-8ae6cb9ecc5sm37910766d6.23.2026.04.16.06.51.29\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Thu, 16 Apr 2026 06:51:29 -0700 (PDT)"],"DKIM-Filter":["OpenDKIM Filter v2.11.0 sourceware.org D27364BA9028","OpenDKIM Filter v2.11.0 sourceware.org E586A4BA23F4"],"DMARC-Filter":"OpenDMARC Filter v1.4.2 sourceware.org E586A4BA23F4","ARC-Filter":"OpenARC Filter v1.0.0 sourceware.org E586A4BA23F4","ARC-Seal":"i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1776347493; cv=none;\n b=JWbHNbwvAyc7RroKkI08WwnOOJxtBySo71xQ1YYhd5faYIC0xF4iPC43Uy5KgFBcqn+S6cWPkimJfGkXxi6NcjvoqYrklg54+GEUZBloEPUGeGQNgkJ5FChF3UEE62bJTa3f+XnU+GHijlmC5HGjlFWiswZpHH2gkjiUMzlgaSo=","ARC-Message-Signature":"i=1; a=rsa-sha256; d=sourceware.org; s=key;\n t=1776347493; c=relaxed/simple;\n bh=PgX+S0h3vBeM9KUbRSOuVdKTiUOAfMAd3RqGAHCeoZY=;\n h=DKIM-Signature:From:Date:To:Subject:Message-ID:MIME-Version;\n b=jUtphHoEP2x9Njva5so1rltPGynpdxTFlugcjH87ZF4nNOnKn+k2fZmVPVALUA+4rviG6QxZ9bkt7I+OzlwHETI/CF0pbnnhB2ZQzprlqRnVnpjLAuf/soMIF3sMdjOAKbW4zrDFRGDhzQEDOqLJp7xDjgtTwLe8cRIXg9ruj1w=","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=1776347492;\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 in-reply-to:in-reply-to:references:references;\n bh=RKyna1/MtqnTUZ0cEb+tE75SlAO85kxyFoFJBRffV8w=;\n b=iYM8PIBwjjW29yd4GqNCvkit6XQk6L1a55Hs0I8OSnBXtVOky0ktGb+s2RHFVKziFOGqXq\n 9EULBdnCYEYOx83MRJGxwUTxy800ELovoynm87KIdaDub5NTfEcx88LF1+knBRvVKN80/C\n fRrZbttDy2cXsX7Ah3o0S/TfPRmyVSY=","X-MC-Unique":"V8JPJC4sOPuNP4Og-C0lrw-1","X-Mimecast-MFC-AGG-ID":"V8JPJC4sOPuNP4Og-C0lrw_1776347490","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20251104; t=1776347490; x=1776952290;\n h=mime-version:references:message-id:in-reply-to:subject:cc:to:date\n :from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id\n :reply-to;\n bh=RKyna1/MtqnTUZ0cEb+tE75SlAO85kxyFoFJBRffV8w=;\n b=HplyOnPmIg7V8E2z4jnjVcDhzq3r1OtDY909xwSqrO05q9k+7FpLU52DFqdZegtly7\n rodtfCUly0EudlGXUlTx/HSERSIkNkrG2oZZ5khCNDLzmQ9ip+QNzHob+YdcfPS5HQSH\n 0dV4axqDZphLklaeGceNY2YQX6Ao9Q4QR+hOO8wgeP/HR0Xql96K14Q2R1Dr12s6y3cw\n OniUP6HuMmaw6R7HaCgmYLIiILJxLNTZKa8Z5SeGGgFhpqLhKFUvtsRGySfMBsAW/YP5\n PJC7Z2lyBP53yP1UCo2zQI3pa8LExJbYpJ1mvLkGsdn/lkkawesfqwg3jMtktlLdSHIb\n PbBg==","X-Gm-Message-State":"AOJu0YznhNwZeGA8O5I78msd17oYxDajRRRSRxD5PdntUwGjJJjkyvIQ\n UuCnENWmVViSTCX/8O2j3U7r2XL83DXizXx8T8KdaigDa2thCkPsQ0GrtABi7KhWYQjSrYgAFSI\n /LuiD8UaUV8pCaQoYqHvwxV7IlE3oeAPfWlPz1HU4TO7eJGygzHdcemCk3ik=","X-Gm-Gg":"AeBDieso5LdQwHr4UAvlZy5jb5W6hIqTaRXmK71KCIgXYa8a+FhGpP9zAoEIYYoKu+l\n VGTMlcxdU/bLXZKXmUO1gqVbVd7ZSK1TduiD4LDVk6ojglzT3Pk2Iw8GuxpmvvCrWstAsSIxX8A\n 2VlUMyC95LqkJit6YMcluLm910pTXSigYEtl3iCcIkYGmdTAuZvk/qbItfPysHJ8AGGuvKdLZzm\n DlbmffAbXraCCNSmLVlE+rr7sfgIfgD0v+zPuCf/BIVVcd0Z3gqe23YCE63WjfWZqdtfHoX2Jj6\n h/vZiHWm1MRnuyoz0vRzWNSI7evfiSYO1ha3fxiIcQLLiCRmE70J3FBkgvm9SEnxS6rT0aVqVbs\n JOMkiRT+ekLkPit3EiWpEvZcEvHAw3hpYfHY4OCT+8/swmiKhcudETQ==","X-Received":["by 2002:ad4:5dcd:0:b0:8ae:65b7:1b0a with SMTP id\n 6a1803df08f44-8ae6a86d0dcmr78610286d6.2.1776347490397;\n Thu, 16 Apr 2026 06:51:30 -0700 (PDT)","by 2002:ad4:5dcd:0:b0:8ae:65b7:1b0a with SMTP id\n 6a1803df08f44-8ae6a86d0dcmr78609846d6.2.1776347489911;\n Thu, 16 Apr 2026 06:51:29 -0700 (PDT)"],"From":"Patrick Palka <ppalka@redhat.com>","X-Google-Original-From":"Patrick Palka <patrick@idea>","Date":"Thu, 16 Apr 2026 09:51:28 -0400 (EDT)","To":"feedable <feedabl3@gmail.com>","cc":"gcc-patches@gcc.gnu.org, mpolacek@redhat.com, jason@redhat.com","Subject":"Re: [PATCH v2] c++/reflection: ICE on member function template\n splicing [PR124794]","In-Reply-To":"<20260409201824.1440501-1-feedabl3@gmail.com>","Message-ID":"<ff7f00c1-210c-c679-577b-9a9e75710eeb@idea>","References":"<20260409201824.1440501-1-feedabl3@gmail.com>","MIME-Version":"1.0","X-Mimecast-Spam-Score":"0","X-Mimecast-MFC-PROC-ID":"sC_5IYwNdJMDGSTdk9LVGsFm8eS5Y8BRNPFjouMepgI_1776347490","X-Mimecast-Originator":"redhat.com","Content-Type":"text/plain; charset=US-ASCII","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"}},{"id":3678759,"web_url":"http://patchwork.ozlabs.org/comment/3678759/","msgid":"<61e102f4-53f0-4f27-84ec-66a8fcf3a90c@gmail.com>","list_archive_url":null,"date":"2026-04-17T15:03:50","subject":"Re: [PATCH v2] c++/reflection: ICE on member function template\n splicing [PR124794]","submitter":{"id":92146,"url":"http://patchwork.ozlabs.org/api/people/92146/","name":"feedable","email":"feedabl3@gmail.com"},"content":"On 4/16/26 4:51 PM, Patrick Palka wrote:\n> Hi, Thanks for the revised patch!\n>\n> On Thu, 9 Apr 2026, feedable wrote:\n>\n>> cp_parser_splice_expression is stripping BASELINKs before resolving the expr;\n>> checks if the result is a BASELINK after that (by which point it never is).\n>> To fix it, we strip the BASELINK only after resolving and only for checks\n>> (where applicable).\n>>\n>> In cp_parser_splice_specifier, the additional template param parsing fails to\n>> detect that the reflection is a template if it's wrapped in a BASELINKs, and\n>> decides not to parse the splice-specialization-specifier if the 'template'\n>> keyword is missing.\n>> Strip BASELINKs for the purposes of checking and grab the data from the\n>> reflection for actual use.\n>>\n>> \tPR c++/124794\n>>\n>> gcc/cp/ChangeLog:\n>>\n>> \t* parser.cc (cp_parser_splice_specifier): Do not strip BASELINKs\n>> \t(cp_parser_splice_expression): Add parsing for member function template\n>> \tspecializations without the \"template\" keyword\n>>\n>> gcc/testsuite/ChangeLog:\n>>\n>> \t* g++.dg/reflect/splice12.C: New test.\n> Sorry for the possibly redundant question, but do you have copyright\n> assignment with the FSF or are you contributing via DCO\n> (https://gcc.gnu.org/dco.html)?\n>\n> Besides that your patch seems reasonable to me but I'm not very familar\n> with the reflection code, deferring to Marek or Jason for proper view.\nHi, yes, I do have assignment with the FSF (and already have a patch \nmerged under that)\n>> ---\n>>   gcc/cp/parser.cc                        | 24 +++++++++--------\n>>   gcc/testsuite/g++.dg/reflect/splice12.C | 34 +++++++++++++++++++++++++\n>>   2 files changed, 48 insertions(+), 10 deletions(-)\n>>   create mode 100644 gcc/testsuite/g++.dg/reflect/splice12.C\n>>\n>> diff --git a/gcc/cp/parser.cc b/gcc/cp/parser.cc\n>> index fe27a15a283..ea89847116d 100644\n>> --- a/gcc/cp/parser.cc\n>> +++ b/gcc/cp/parser.cc\n>> @@ -6179,6 +6179,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 = maybe_get_first_fn (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>> @@ -6190,30 +6192,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>> @@ -6310,7 +6315,6 @@ cp_parser_splice_expression (cp_parser *parser, bool template_p,\n>>     tree t = expr.get_value ();\n>>     STRIP_ANY_LOCATION_WRAPPER (t);\n>>     tree unresolved = t;\n>> -  t = MAYBE_BASELINK_FUNCTIONS (t);\n>>     t = resolve_nondeduced_context (t, tf_warning_or_error);\n>>   \n>>     if (dependent_splice_p (t))\n>> @@ -6331,8 +6335,8 @@ cp_parser_splice_expression (cp_parser *parser, bool template_p,\n>>       }\n>>   \n>>     /* Make sure this splice-expression produces an expression.  */\n>> -  if (!check_splice_expr (loc, expr.get_start (), t, address_p,\n>> -\t\t\t  member_access_p, template_p, targs_p,\n>> +  if (!check_splice_expr (loc, expr.get_start (), MAYBE_BASELINK_FUNCTIONS (t),\n>> +                          address_p, member_access_p, template_p, targs_p,\n>>   \t\t\t  /*complain=*/true))\n>>       return error_mark_node;\n>>   \n>> diff --git a/gcc/testsuite/g++.dg/reflect/splice12.C b/gcc/testsuite/g++.dg/reflect/splice12.C\n>> new file mode 100644\n>> index 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>> -- \n>> 2.53.0\n>>\n>>","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=as14eqm4;\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=as14eqm4","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.51"],"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 4fxysM3xBKz1yDF\n\tfor <incoming@patchwork.ozlabs.org>; Sat, 18 Apr 2026 01:07:02 +1000 (AEST)","from vm01.sourceware.org (localhost [127.0.0.1])\n\tby sourceware.org (Postfix) with ESMTP id 3BC024CCCA2C\n\tfor <incoming@patchwork.ozlabs.org>; Fri, 17 Apr 2026 15:07:00 +0000 (GMT)","from mail-wm1-f51.google.com (mail-wm1-f51.google.com\n [209.85.128.51])\n by sourceware.org (Postfix) with ESMTPS id 6BCEE4C900CA\n for <gcc-patches@gcc.gnu.org>; Fri, 17 Apr 2026 15:03:53 +0000 (GMT)","by mail-wm1-f51.google.com with SMTP id\n 5b1f17b1804b1-488ab2db91aso9795265e9.3\n for <gcc-patches@gcc.gnu.org>; Fri, 17 Apr 2026 08:03:53 -0700 (PDT)","from ?IPV6:2a02:8308:900b:fc00::a58? ([2a02:8308:900b:fc00::a58])\n by smtp.gmail.com with ESMTPSA id\n 5b1f17b1804b1-488fb755938sm27100265e9.3.2026.04.17.08.03.51\n (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);\n Fri, 17 Apr 2026 08:03:51 -0700 (PDT)"],"DKIM-Filter":["OpenDKIM Filter v2.11.0 sourceware.org 3BC024CCCA2C","OpenDKIM Filter v2.11.0 sourceware.org 6BCEE4C900CA"],"DMARC-Filter":"OpenDMARC Filter v1.4.2 sourceware.org 6BCEE4C900CA","ARC-Filter":"OpenARC Filter v1.0.0 sourceware.org 6BCEE4C900CA","ARC-Seal":"i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1776438233; cv=none;\n b=tXzvUU5y9t8fdxd+rE2DffQTqauEmwNV9R2gdi/0XlagVr+O4jWX5vGnHEiiHnAmDdxOs28bhgHKhWMyLXOl3tQmfJUS/es10uIzO0gc9oZ1yf6O4dTPd9Cwb6oY7VeGXpDotXqC1ljdfL51bYkfXD2Ghps2xI1hC8GQxvSresE=","ARC-Message-Signature":"i=1; a=rsa-sha256; d=sourceware.org; s=key;\n t=1776438233; c=relaxed/simple;\n bh=sElvWCuwkTbXhwHmJWmwDrJM0Gi6pXjYEXymfZX3Ucg=;\n h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From;\n b=Lilonrepzbyp5y3PdJ9s+Yw2xGWzGm9gxy+xuimKUU54fgoQlpvdo3K7GiL0VqOTxha4E9CVc0rygUuTeKAoFTQMnLVNsuFta/Dr+tHgjHPUFONSukpGWXhEfuMz9TxWRewvTHclcORK/9LXFtME+up273Zo6rOuxH78MN9eAxc=","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=1776438232; x=1777043032; darn=gcc.gnu.org;\n h=content-transfer-encoding:in-reply-to:from:content-language\n :references:cc:to:subject:user-agent:mime-version:date:message-id\n :from:to:cc:subject:date:message-id:reply-to;\n bh=HfuvwYmYdtWiDW/KqVOAmgK/GCwsPkCZ/QG1Py5t8ak=;\n b=as14eqm43/HoBPwBTKCgEqMla404Ida1Zl1MU/5i/ZBUeusr/nZBfnhrDuaFqNsKO7\n jbbrl7wTuwcbVMtfRe9KegRw7LN7aS7ZkRMGq57h+Lzn5nnRUaU676TWLrBQCQ2MqrNi\n qKE5YZDSv4uf8i/aa3qecoQwjJ1J1ObX5VVSorJ9p7pzKoydnsGx1iXFF0b+kLebhkU3\n Iq6/J50lM2/uifjPkLdrvHIwmglvSBouuvz2iXJwmgPALiBW/4Wd6ky202Z9AjwIPIgk\n iVHSutZb/Ym4V4Qd1JHXTE9CjSQ9N6SBpZSCxhLklcRiKHk1aWoy1J7fPBo6NvAGEfuq\n +WjA==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20251104; t=1776438232; x=1777043032;\n h=content-transfer-encoding:in-reply-to:from:content-language\n :references:cc:to:subject:user-agent:mime-version:date:message-id\n :x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id\n :reply-to;\n bh=HfuvwYmYdtWiDW/KqVOAmgK/GCwsPkCZ/QG1Py5t8ak=;\n b=EtGCBQ9j42hL16oEzFRs17OwL7bPChYi7YcOKvVe0GzqL4xTVJQys3WUHv+S1q6Gi+\n Zc3y9Cysg2rYm1Ue1xxiPvODg1GoNC9CK6DyUtyvf5JVYjZOBrFqLLRWZk0fa0O0noZY\n cjPLHsBPttR+1i+tsVy/odHkRNWVZ5/TVr+3SAxRbBv+E4jmJB7Rq/lB7gbmtggpVJDi\n rrGIIqwHh44VFuP8f3c0wE6wGF1blohz8t/FU0Gdfpfkmqh4V9BQ2te1g1Xmx+UJm4cB\n xBjXdSClckVwP4kRLbpFxOxoaqpATOm0W/C7Ti9utQqWsFNk1tB6s1JTEcZd3Iihmxq/\n pWzQ==","X-Gm-Message-State":"AOJu0YzJ8u426NOBGVlRwU13M4OzruV84Sf2rTNZhwJa1hOIYDA1PM+e\n jDzgDqLJCl0+uUK64QDChKUj4oRA/9Orp3nBNR6F4T1dc42dLjAAwptg","X-Gm-Gg":"AeBDies+klOv+1iF21dYW0sumRfb2xHgAriTXpB7beWxUbSpdvnpT0qBhrK/OMERtbb\n j+xtxxCIbtUOVOEnmqHu0bUL/h7UbZWvYc8xFub7t33twuPVrnaZx02Nf8Lnd1sGH3aQj7skkS0\n 6XBb7OV3CkZLWpyYeIjB5G4ZxCRTZU4+0/LSMyDsmAQ0I72kHs0nNV+Zve8YD/McTv/jv7Hk4U5\n 4vfyqsrVabK2xPE6tBGLv1LxaepZf+eW+1lfdX7kbL4RzxNAvekY0JFEve3XF8gIoJS+yg4NBcU\n xkwzMQ9XPqYnSjT6X9LmxdqR08DWcu8pmIZfcvQPkIx9MRa7MITRZVE9PVdFILN+x0rAr2bFXzc\n T/rZ1J7M5DUok2fjvGRA8F2ccuEekLBAzvW7mTfA66Qv7lMNIMUPGWrMo6gMG2Yv/dTATY0Vp4l\n 607yIq1X9DKcpUKopob2N3ENFPtKv2qrmqphfno9PfO6o=","X-Received":"by 2002:a05:600c:c177:b0:488:a82f:bba9 with SMTP id\n 5b1f17b1804b1-488fb7804f3mr46060385e9.22.1776438231881;\n Fri, 17 Apr 2026 08:03:51 -0700 (PDT)","Message-ID":"<61e102f4-53f0-4f27-84ec-66a8fcf3a90c@gmail.com>","Date":"Fri, 17 Apr 2026 18:03:50 +0300","MIME-Version":"1.0","User-Agent":"Mozilla Thunderbird","Subject":"Re: [PATCH v2] c++/reflection: ICE on member function template\n splicing [PR124794]","To":"Patrick Palka <ppalka@redhat.com>","Cc":"gcc-patches@gcc.gnu.org, mpolacek@redhat.com, jason@redhat.com","References":"<20260409201824.1440501-1-feedabl3@gmail.com>\n <ff7f00c1-210c-c679-577b-9a9e75710eeb@idea>","Content-Language":"en-US","From":"feedable <feedabl3@gmail.com>","In-Reply-To":"<ff7f00c1-210c-c679-577b-9a9e75710eeb@idea>","Content-Type":"text/plain; charset=UTF-8; format=flowed","Content-Transfer-Encoding":"7bit","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"}},{"id":3679538,"web_url":"http://patchwork.ozlabs.org/comment/3679538/","msgid":"<9b2e103f-a71e-460a-89cc-4809e91dc533@redhat.com>","list_archive_url":null,"date":"2026-04-20T19:22:50","subject":"Re: [PATCH v2] c++/reflection: ICE on member function template\n splicing [PR124794]","submitter":{"id":4337,"url":"http://patchwork.ozlabs.org/api/people/4337/","name":"Jason Merrill","email":"jason@redhat.com"},"content":"On 4/9/26 4:17 PM, feedable wrote:\n> cp_parser_splice_expression is stripping BASELINKs before resolving the expr;\n> checks if the result is a BASELINK after that (by which point it never is).\n> To fix it, we strip the BASELINK only after resolving and only for checks\n> (where applicable).\n> \n> In cp_parser_splice_specifier, the additional template param parsing fails to\n> detect that the reflection is a template if it's wrapped in a BASELINKs, and\n> decides not to parse the splice-specialization-specifier if the 'template'\n> keyword is missing.\n> Strip BASELINKs for the purposes of checking and grab the data from the\n> reflection for actual use.\n> \n> \tPR c++/124794\n> \n> gcc/cp/ChangeLog:\n> \n> \t* parser.cc (cp_parser_splice_specifier): Do not strip BASELINKs\n> \t(cp_parser_splice_expression): Add parsing for member function template\n> \tspecializations without the \"template\" keyword\n> \n> gcc/testsuite/ChangeLog:\n> \n> \t* g++.dg/reflect/splice12.C: New test.\n> ---\n>   gcc/cp/parser.cc                        | 24 +++++++++--------\n>   gcc/testsuite/g++.dg/reflect/splice12.C | 34 +++++++++++++++++++++++++\n>   2 files changed, 48 insertions(+), 10 deletions(-)\n>   create mode 100644 gcc/testsuite/g++.dg/reflect/splice12.C\n> \n> diff --git a/gcc/cp/parser.cc b/gcc/cp/parser.cc\n> index fe27a15a283..ea89847116d 100644\n> --- a/gcc/cp/parser.cc\n> +++ b/gcc/cp/parser.cc\n> @@ -6179,6 +6179,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 = maybe_get_first_fn (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> @@ -6190,30 +6192,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> @@ -6310,7 +6315,6 @@ cp_parser_splice_expression (cp_parser *parser, bool template_p,\n>     tree t = expr.get_value ();\n>     STRIP_ANY_LOCATION_WRAPPER (t);\n>     tree unresolved = t;\n> -  t = MAYBE_BASELINK_FUNCTIONS (t);\n>     t = resolve_nondeduced_context (t, tf_warning_or_error);\n>   \n>     if (dependent_splice_p (t))\n> @@ -6331,8 +6335,8 @@ cp_parser_splice_expression (cp_parser *parser, bool template_p,\n>       }\n>   \n>     /* Make sure this splice-expression produces an expression.  */\n> -  if (!check_splice_expr (loc, expr.get_start (), t, address_p,\n> -\t\t\t  member_access_p, template_p, targs_p,\n> +  if (!check_splice_expr (loc, expr.get_start (), MAYBE_BASELINK_FUNCTIONS (t),\n\nI think it's probably preferable for check_splice_expr to handle getting \na BASELINK, since tsubst_splice_expr.  Marek, thoughts?\n\nJason","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=YWFqeG2b;\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=YWFqeG2b","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.133.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 4fzwPs1v9zz1yD4\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 21 Apr 2026 05:23:27 +1000 (AEST)","from vm01.sourceware.org (localhost [127.0.0.1])\n\tby sourceware.org (Postfix) with ESMTP id D1BF34BA23CF\n\tfor <incoming@patchwork.ozlabs.org>; Mon, 20 Apr 2026 19:23:24 +0000 (GMT)","from us-smtp-delivery-124.mimecast.com\n (us-smtp-delivery-124.mimecast.com [170.10.133.124])\n by sourceware.org (Postfix) with ESMTP id 3EA844BA2E3B\n for <gcc-patches@gcc.gnu.org>; Mon, 20 Apr 2026 19:22:55 +0000 (GMT)","from mail-qv1-f70.google.com (mail-qv1-f70.google.com\n [209.85.219.70]) by relay.mimecast.com with ESMTP with STARTTLS\n (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id\n us-mta-610-YFJObT-kPIeM5Q_9K6kyog-1; Mon, 20 Apr 2026 15:22:53 -0400","by mail-qv1-f70.google.com with SMTP id\n 6a1803df08f44-8a5f6110cadso79719316d6.3\n for <gcc-patches@gcc.gnu.org>; Mon, 20 Apr 2026 12:22:53 -0700 (PDT)","from [192.168.50.130]\n (130-44-146-247.s12789.c3-0.arl-cbr1.sbo-arl.ma.cable.rcncustomer.com.\n [130.44.146.247]) by smtp.gmail.com with ESMTPSA id\n 6a1803df08f44-8b02ae7df88sm88507196d6.35.2026.04.20.12.22.50\n (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);\n Mon, 20 Apr 2026 12:22:51 -0700 (PDT)"],"DKIM-Filter":["OpenDKIM Filter v2.11.0 sourceware.org D1BF34BA23CF","OpenDKIM Filter v2.11.0 sourceware.org 3EA844BA2E3B"],"DMARC-Filter":"OpenDMARC Filter v1.4.2 sourceware.org 3EA844BA2E3B","ARC-Filter":"OpenARC Filter v1.0.0 sourceware.org 3EA844BA2E3B","ARC-Seal":"i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1776712975; cv=none;\n b=FyN9UFZjqKo9Vf0zCtHK2V8tIOoIcJcBmvOvNYqIW12lIGxJsF+jMKl29ebQz5mV5JBAXFcbMGNlpNjzia2MR8vix+0a06QSZW+iXCQVLjgHHDLtAYmuWUPQejmR4z+7yHgBv/CID1oIgnB64vtvgguhERzQ92aJ2mldwEVs7FI=","ARC-Message-Signature":"i=1; a=rsa-sha256; d=sourceware.org; s=key;\n t=1776712975; c=relaxed/simple;\n bh=NYOOh3rfm3mdqFBKSdk9gyp9Ubmo5HlwBZeFL1llEK8=;\n h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From;\n b=xbz/aoHMAyouvDOyJ8mLsg1D+j7j5pIoVmUgEsWKkCT57PkFoSFwJIpKa4eW/pUc0QnpPwfUPepCUKDYGk5W71s0zJvYbDHBeEZFoYivPa6joBzGivl/LqCZah1Opj1dc4oL2/8XftoH29xOIegfPkhaoArPWoyUsYvpZof6mcs=","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=1776712974;\n h=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n to:to:cc:mime-version:mime-version:content-type:content-type:\n content-transfer-encoding:content-transfer-encoding:\n in-reply-to:in-reply-to:references:references;\n bh=/tBCZQ5z+1M4cYnjFE6rV/wyO1sijsVEVZ7xag47QO8=;\n b=YWFqeG2bI7SH4a/lF+LHFUPDj+J9b2zaPqJ5vF09/xUqHNmY9RvqkjlAk7RcqULn9vkgk9\n CtvS3zwXLtz1WVXSDr1qYvwTdmmmGo837V6EKdaS9mf7WwsB3ysxVpu6Yf5XGvqXWtEv5u\n xiQ/l+6zIhzpl4KmS6nMg8jqr8Y3J14=","X-MC-Unique":"YFJObT-kPIeM5Q_9K6kyog-1","X-Mimecast-MFC-AGG-ID":"YFJObT-kPIeM5Q_9K6kyog_1776712973","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20251104; t=1776712972; x=1777317772;\n h=content-transfer-encoding:in-reply-to:from:content-language\n :references:to:subject:user-agent:mime-version:date:message-id\n :x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id\n :reply-to;\n bh=/tBCZQ5z+1M4cYnjFE6rV/wyO1sijsVEVZ7xag47QO8=;\n b=Hgn/MjEOxd2pH2tcxxZ3zuDLgxoPYvvi0ALQSa7+6mYhhy5M/TMq8wbi1WgOmJT6dA\n KqgUm8J0uT7NEi2wmNsYOrac4shxSiXfJkNiGPv/URhETmXQSxvCGYb9+VGeFGeavnrR\n ree9aZQbhpUYHP2X0i8LJgxheC6J7yd2iRk1b2A1LwNQ/T013Feghuk6vibg0LxtdhLJ\n EiSjidnMPzSREXYtgzjw5dTFyVxx0edxoJoxZRqXTEkSTt33rNwbYn57wUKsC3JY6GI9\n DA7r0fDvLLY0u6KvBGyKBOHEUDVHfY6hbbvg6xhWLOtoSTHl3Ts798kJi98qhnURV66A\n vVpw==","X-Forwarded-Encrypted":"i=1;\n AFNElJ9e6mj3ZNDoy3/xHDhsW+QaIQAqokvUxyENQGOQGliJ0nzwxNg8/yMp9lMJxReZUF78gk7TSm9SeLKw6Q==@gcc.gnu.org","X-Gm-Message-State":"AOJu0YzG+iXL145BiE+RNnUXpW0AatrP/JSUe4qeXctb/7CDEkJEjgR5\n 1pe7wOtEPO9lYA0FkeOo1OtIQt+XJzR/AOfBGrzcE383z9lc4jO6Xdkk4jFw87caaOmgZCzwZOZ\n YjRUz3y51tdQc4gAjaNjKejj1I0NwDmVeoYQHKvJs2MnD1RSsOuN3S1Mpd9eo6Ja7rKq6jw==","X-Gm-Gg":"AeBDieucNWgh6B/NTwiKYuHjaUrGwEwsT+Ex8+3Q9th48P5eCcRLa+0B9GbD6f3qwfk\n mW/ngknXUBFTndL/017MFowuCZa4Jd9x5y3Nax1vkMOlHvDDyrZ7UZKOW45c59k7+KMGCJGDHmZ\n nM09dT0IX/7PlBX6wcTsihOspi+2MS+sChnqJuqhsJSaRrTCtc1rcu5vhhlPNf6Izk+eArcnCrm\n sgZ/hcBriNegxQk4JjolufJA6wmo5PjuwGWppgNioD2iuPwDoVoR0hBW8laHTyAj5EVhLk0BCFG\n C9m0uBrzFC99rReDVR8P9NZatK2HC2sZCX61c4QsqcNFfcCuj1AsSNc+Fc3WF4RCTTj3bBhS/bl\n KoRSUT2fZctvi5Pj3Xc7UDE/q4SujQ6+KzC592566mQiEsZmhOmBFEY879K/Z8hTsA6ZpaExuTM\n vTg255VGrZDiaEYx+TyxKkv9JpY5JFoFqQ9T8x/zcMbg==","X-Received":["by 2002:a05:6214:29e9:b0:89e:df5c:19f6 with SMTP id\n 6a1803df08f44-8b028137605mr247235076d6.42.1776712972458;\n Mon, 20 Apr 2026 12:22:52 -0700 (PDT)","by 2002:a05:6214:29e9:b0:89e:df5c:19f6 with SMTP id\n 6a1803df08f44-8b028137605mr247234556d6.42.1776712971842;\n Mon, 20 Apr 2026 12:22:51 -0700 (PDT)"],"Message-ID":"<9b2e103f-a71e-460a-89cc-4809e91dc533@redhat.com>","Date":"Mon, 20 Apr 2026 15:22:50 -0400","MIME-Version":"1.0","User-Agent":"Mozilla Thunderbird","Subject":"Re: [PATCH v2] c++/reflection: ICE on member function template\n splicing [PR124794]","To":"feedable <feedabl3@gmail.com>, gcc-patches@gcc.gnu.org","References":"<20260409201824.1440501-1-feedabl3@gmail.com>","From":"Jason Merrill <jason@redhat.com>","In-Reply-To":"<20260409201824.1440501-1-feedabl3@gmail.com>","X-Mimecast-Spam-Score":"0","X-Mimecast-MFC-PROC-ID":"q4kd3iyAJRwYQJX3klAYyWfs_jb1acAyBYKyf1jRCco_1776712973","X-Mimecast-Originator":"redhat.com","Content-Language":"en-US","Content-Type":"text/plain; charset=UTF-8; format=flowed","Content-Transfer-Encoding":"7bit","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"}},{"id":3679562,"web_url":"http://patchwork.ozlabs.org/comment/3679562/","msgid":"<aeaDi_zEQ4HO-obX@redhat.com>","list_archive_url":null,"date":"2026-04-20T19:50:35","subject":"Re: [PATCH v2] c++/reflection: ICE on member function template\n splicing [PR124794]","submitter":{"id":14370,"url":"http://patchwork.ozlabs.org/api/people/14370/","name":"Marek Polacek","email":"polacek@redhat.com"},"content":"On Mon, Apr 20, 2026 at 03:22:50PM -0400, Jason Merrill wrote:\n> On 4/9/26 4:17 PM, feedable wrote:\n> > cp_parser_splice_expression is stripping BASELINKs before resolving the expr;\n> > checks if the result is a BASELINK after that (by which point it never is).\n> > To fix it, we strip the BASELINK only after resolving and only for checks\n> > (where applicable).\n> > \n> > In cp_parser_splice_specifier, the additional template param parsing fails to\n> > detect that the reflection is a template if it's wrapped in a BASELINKs, and\n> > decides not to parse the splice-specialization-specifier if the 'template'\n> > keyword is missing.\n> > Strip BASELINKs for the purposes of checking and grab the data from the\n> > reflection for actual use.\n> > \n> > \tPR c++/124794\n> > \n> > gcc/cp/ChangeLog:\n> > \n> > \t* parser.cc (cp_parser_splice_specifier): Do not strip BASELINKs\n> > \t(cp_parser_splice_expression): Add parsing for member function template\n> > \tspecializations without the \"template\" keyword\n> > \n> > gcc/testsuite/ChangeLog:\n> > \n> > \t* g++.dg/reflect/splice12.C: New test.\n\nNote that this test will have to be renamed to splice13.C.\n\n> > ---\n> >   gcc/cp/parser.cc                        | 24 +++++++++--------\n> >   gcc/testsuite/g++.dg/reflect/splice12.C | 34 +++++++++++++++++++++++++\n> >   2 files changed, 48 insertions(+), 10 deletions(-)\n> >   create mode 100644 gcc/testsuite/g++.dg/reflect/splice12.C\n> > \n> > diff --git a/gcc/cp/parser.cc b/gcc/cp/parser.cc\n> > index fe27a15a283..ea89847116d 100644\n> > --- a/gcc/cp/parser.cc\n> > +++ b/gcc/cp/parser.cc\n> > @@ -6179,6 +6179,8 @@ cp_parser_splice_specifier (cp_parser *parser, bool template_p = false,\n> >     /* Get the reflected operand.  */\n> >     expr = splice (expr);\n> > +  tree expr_real = maybe_get_first_fn (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> > @@ -6190,30 +6192,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\nIt's probably reasonable to use reflection_function_template_p here\nbut I certainly wouldn't insist.\n\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\nExtra space before =.  Also I guess BASELINK_ACCESS_BINFO instead of\nBASELINK_BINFO?\n\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> > @@ -6310,7 +6315,6 @@ cp_parser_splice_expression (cp_parser *parser, bool template_p,\n> >     tree t = expr.get_value ();\n> >     STRIP_ANY_LOCATION_WRAPPER (t);\n> >     tree unresolved = t;\n> > -  t = MAYBE_BASELINK_FUNCTIONS (t);\n> >     t = resolve_nondeduced_context (t, tf_warning_or_error);\n> >     if (dependent_splice_p (t))\n> > @@ -6331,8 +6335,8 @@ cp_parser_splice_expression (cp_parser *parser, bool template_p,\n> >       }\n> >     /* Make sure this splice-expression produces an expression.  */\n> > -  if (!check_splice_expr (loc, expr.get_start (), t, address_p,\n> > -\t\t\t  member_access_p, template_p, targs_p,\n> > +  if (!check_splice_expr (loc, expr.get_start (), MAYBE_BASELINK_FUNCTIONS (t),\n> \n> I think it's probably preferable for check_splice_expr to handle getting a\n> BASELINK, since tsubst_splice_expr.  Marek, thoughts?\n\nI think that's better.  It looks like we'll need MAYBE_BASELINK_FUNCTIONS\nbefore the gcc_checking_assert at the end of check_splice_expr for the\nget_template_info check.\n\nMarek","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=LqbQGl8p;\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=LqbQGl8p","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 4fzx2P271Rz1yHB\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 21 Apr 2026 05:51:41 +1000 (AEST)","from vm01.sourceware.org (localhost [127.0.0.1])\n\tby sourceware.org (Postfix) with ESMTP id 5016C4CCCA31\n\tfor <incoming@patchwork.ozlabs.org>; Mon, 20 Apr 2026 19:51:39 +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 DD43C4CCCA31\n for <gcc-patches@gcc.gnu.org>; Mon, 20 Apr 2026 19:50:41 +0000 (GMT)","from mail-qk1-f197.google.com (mail-qk1-f197.google.com\n [209.85.222.197]) by relay.mimecast.com with ESMTP with STARTTLS\n (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id\n us-mta-313-IBsg1sgFPF6w5eZSepJk-g-1; Mon, 20 Apr 2026 15:50:38 -0400","by mail-qk1-f197.google.com with SMTP id\n af79cd13be357-8d3ea68b9cdso662223985a.3\n for <gcc-patches@gcc.gnu.org>; Mon, 20 Apr 2026 12:50:38 -0700 (PDT)","from redhat.com ([2603:7000:9500:10::1db4])\n by smtp.gmail.com with ESMTPSA id\n af79cd13be357-8e7d5fe9800sm882495585a.5.2026.04.20.12.50.36\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Mon, 20 Apr 2026 12:50:37 -0700 (PDT)"],"DKIM-Filter":["OpenDKIM Filter v2.11.0 sourceware.org 5016C4CCCA31","OpenDKIM Filter v2.11.0 sourceware.org DD43C4CCCA31"],"DMARC-Filter":"OpenDMARC Filter v1.4.2 sourceware.org DD43C4CCCA31","ARC-Filter":"OpenARC Filter v1.0.0 sourceware.org DD43C4CCCA31","ARC-Seal":"i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1776714642; cv=none;\n b=WcAuM61tXb5elzmL5SW4kjfVoJgR9asTpKogE9pOiGTloppwPiYtHYKVy1qkB2GI5bU0YOYPvgaRKaJK918t0c3IGKnZg63PD6dQv0dwaJwv324SiLc5iQEbA8fPpRwHiBOn6E4eW3+3mXEm6ttkw7o+0FdDHCbPE6p2//9G3Pk=","ARC-Message-Signature":"i=1; a=rsa-sha256; d=sourceware.org; s=key;\n t=1776714642; c=relaxed/simple;\n bh=UB8v6ZA+p/rXPrJyGrgs+SOLEkCz6v79Syem57X8zFw=;\n h=DKIM-Signature:Date:From:To:Subject:Message-ID:MIME-Version;\n b=ZKNfhWEJf7IwBssjO95U+9PMWQ+n+JUT4askI4XNU26bQ2l2/BymfG2/eFtCN3ueL9M3Sj3wLVXkTfwdhik2LSIsQdehPrFx0hj6TSaFWSovP9/FjfIVxmB+rNsLMwf6q6BeUvwCWtTL862tJSzYcnSedWcInhjopIn4CaZ4gAs=","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=1776714641;\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 in-reply-to:in-reply-to:references:references;\n bh=qGCQkN1MSUwjV7VbXxHtUIQXZuGLcDp04SmtiYTln5Q=;\n b=LqbQGl8pT7XEJmlUjVgMVyhLB6EdrT+pGRktEde1JHeG9Vn7MkxKYjS9Mw39CeOnT9lhp9\n 0v9I+SgjGWac++JgDnJhecIk6V+e6fV7JwILXCSTLI8o7Xvqf0c+WMrVyX9MUk85tfCXyY\n AlpT1ee+UngveQ/gy5R5vRPLhvW9J5o=","X-MC-Unique":"IBsg1sgFPF6w5eZSepJk-g-1","X-Mimecast-MFC-AGG-ID":"IBsg1sgFPF6w5eZSepJk-g_1776714638","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20251104; t=1776714638; x=1777319438;\n h=user-agent:in-reply-to:content-disposition:mime-version:references\n :message-id:subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from\n :to:cc:subject:date:message-id:reply-to;\n bh=qGCQkN1MSUwjV7VbXxHtUIQXZuGLcDp04SmtiYTln5Q=;\n b=N+DTKy25/f6usg/9MaxixgmxH2riAwQJZTYgPz4HMy8lObebog9grYR9WIViMcaAqq\n jhVOEulkBNsoZrPRB3daHV5gun975V0YqI4Rcn3DfQ1C/LFWf1Qw10Te5+DW5Z9v3vMy\n Su0NvN8f1nhmz5Kv7S3jUkE/XgDmDDL7gJYd3teUuHDYQ6MlYgUXglrOg/3tvZhHYY8l\n ezVaEfUfUMolTQ5G4MdRivDGzvqEIulLRqvF9XY6taXPpKJKyTuru7joQ5Flg5/I5Dv4\n HAowpZU93iDkNWwflYgyfcpYrGcgrsNTWE+F+OtBVg4L+/MkyaLC+axW9hUByhP8ue0v\n DmrQ==","X-Forwarded-Encrypted":"i=1;\n AFNElJ8gKTLzgTrasbJ9kHZdJUOIqq/flG7S6USCmHL33NRvH2mdwO+cGMRAGJsgNCGdFQSZG3qxLL2U2JjrVA==@gcc.gnu.org","X-Gm-Message-State":"AOJu0Yx3kXR+sFIZ0UH5PoU6SY+7Mxwiy9z/M8cTf7B28skLR9pJ31Ik\n ZvDrnzVtLqOshuAWqPXy5hDd2bKAcKmGqpwvOLYS1WdBCC5HVozmz+rGfRQcrtyaBT7GZA54HMa\n 22YM0RAmmts1NRHPMS22drU1LLJbVH04X619p9y+fe8d9zDJIrAv4qKXpfk8=","X-Gm-Gg":"AeBDiesImN0nVAIwttP2sw11oq3kym23I7DR8Lh1xfafqa4j16zi9FKHcTipd0l756F\n /ozjToJegpOvXioBHXquoyqaMFWlZhcGG4waNIQ4QwS+I8Bk8rgHXKLXx/+mh2dMLW9XLcwdJIy\n 4vEOUegXraI4/patnclvWzsnOFB/md5uSXMaJwQ9IVxhFZisTBzj2/wfp8x4NdW0lcjROuJQUzh\n MVYx5aVfTHFX+uvDSwoQ2D91W4t5c2ua+trJYutjXeHLVb51VdNK9Qcq/6Z8m6astV+B8CBU9u1\n RFoqIGzRZXAaZk1pGWp/7dx9cn56hKsf2h+TrvK5BlVjmWuzkJgynVVfiiCBf2F8AQmJ4OdV1Xb\n qWwca6K7Z03/F","X-Received":["by 2002:a05:620a:4101:b0:8cf:e946:bb56 with SMTP id\n af79cd13be357-8e792276307mr2208813085a.44.1776714638145;\n Mon, 20 Apr 2026 12:50:38 -0700 (PDT)","by 2002:a05:620a:4101:b0:8cf:e946:bb56 with SMTP id\n af79cd13be357-8e792276307mr2208807985a.44.1776714637585;\n Mon, 20 Apr 2026 12:50:37 -0700 (PDT)"],"Date":"Mon, 20 Apr 2026 15:50:35 -0400","From":"Marek Polacek <polacek@redhat.com>","To":"Jason Merrill <jason@redhat.com>","Cc":"feedable <feedabl3@gmail.com>, gcc-patches@gcc.gnu.org","Subject":"Re: [PATCH v2] c++/reflection: ICE on member function template\n splicing [PR124794]","Message-ID":"<aeaDi_zEQ4HO-obX@redhat.com>","References":"<20260409201824.1440501-1-feedabl3@gmail.com>\n <9b2e103f-a71e-460a-89cc-4809e91dc533@redhat.com>","MIME-Version":"1.0","In-Reply-To":"<9b2e103f-a71e-460a-89cc-4809e91dc533@redhat.com>","User-Agent":"Mutt/2.3.1 (2026-03-20)","X-Mimecast-Spam-Score":"0","X-Mimecast-MFC-PROC-ID":"6sJq6WqezP9tlTBfOyI_a-SPZfuHvB4OnsHg--8Gw4w_1776714638","X-Mimecast-Originator":"redhat.com","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"}},{"id":3679608,"web_url":"http://patchwork.ozlabs.org/comment/3679608/","msgid":"<82c59580-b3a7-46b8-b2ed-e47ad70289ef@redhat.com>","list_archive_url":null,"date":"2026-04-20T21:27:30","subject":"Re: [PATCH v2] c++/reflection: ICE on member function template\n splicing [PR124794]","submitter":{"id":4337,"url":"http://patchwork.ozlabs.org/api/people/4337/","name":"Jason Merrill","email":"jason@redhat.com"},"content":"On 4/20/26 3:50 PM, Marek Polacek wrote:\n> On Mon, Apr 20, 2026 at 03:22:50PM -0400, Jason Merrill wrote:\n>> On 4/9/26 4:17 PM, feedable wrote:\n>>> cp_parser_splice_expression is stripping BASELINKs before resolving the expr;\n>>> checks if the result is a BASELINK after that (by which point it never is).\n>>> To fix it, we strip the BASELINK only after resolving and only for checks\n>>> (where applicable).\n>>>\n>>> In cp_parser_splice_specifier, the additional template param parsing fails to\n>>> detect that the reflection is a template if it's wrapped in a BASELINKs, and\n>>> decides not to parse the splice-specialization-specifier if the 'template'\n>>> keyword is missing.\n>>> Strip BASELINKs for the purposes of checking and grab the data from the\n>>> reflection for actual use.\n>>>\n>>> \tPR c++/124794\n>>>\n>>> gcc/cp/ChangeLog:\n>>>\n>>> \t* parser.cc (cp_parser_splice_specifier): Do not strip BASELINKs\n>>> \t(cp_parser_splice_expression): Add parsing for member function template\n>>> \tspecializations without the \"template\" keyword\n>>>\n>>> gcc/testsuite/ChangeLog:\n>>>\n>>> \t* g++.dg/reflect/splice12.C: New test.\n> \n> Note that this test will have to be renamed to splice13.C.\n> \n>>> ---\n>>>    gcc/cp/parser.cc                        | 24 +++++++++--------\n>>>    gcc/testsuite/g++.dg/reflect/splice12.C | 34 +++++++++++++++++++++++++\n>>>    2 files changed, 48 insertions(+), 10 deletions(-)\n>>>    create mode 100644 gcc/testsuite/g++.dg/reflect/splice12.C\n>>>\n>>> diff --git a/gcc/cp/parser.cc b/gcc/cp/parser.cc\n>>> index fe27a15a283..ea89847116d 100644\n>>> --- a/gcc/cp/parser.cc\n>>> +++ b/gcc/cp/parser.cc\n>>> @@ -6179,6 +6179,8 @@ cp_parser_splice_specifier (cp_parser *parser, bool template_p = false,\n>>>      /* Get the reflected operand.  */\n>>>      expr = splice (expr);\n>>> +  tree expr_real = maybe_get_first_fn (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>>> @@ -6190,30 +6192,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> \n> It's probably reasonable to use reflection_function_template_p here\n> but I certainly wouldn't insist.\n> \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> \n> Extra space before =.  Also I guess BASELINK_ACCESS_BINFO instead of\n> BASELINK_BINFO?\n\nWe want to use access_path (relative to the actual object_type) in place \nof BASELINK_ACCESS_BINFO, but indeed the access path should be the \nsecond argument rather than the first in both this call and the existing \none.\n\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>>> @@ -6310,7 +6315,6 @@ cp_parser_splice_expression (cp_parser *parser, bool template_p,\n>>>      tree t = expr.get_value ();\n>>>      STRIP_ANY_LOCATION_WRAPPER (t);\n>>>      tree unresolved = t;\n>>> -  t = MAYBE_BASELINK_FUNCTIONS (t);\n>>>      t = resolve_nondeduced_context (t, tf_warning_or_error);\n>>>      if (dependent_splice_p (t))\n>>> @@ -6331,8 +6335,8 @@ cp_parser_splice_expression (cp_parser *parser, bool template_p,\n>>>        }\n>>>      /* Make sure this splice-expression produces an expression.  */\n>>> -  if (!check_splice_expr (loc, expr.get_start (), t, address_p,\n>>> -\t\t\t  member_access_p, template_p, targs_p,\n>>> +  if (!check_splice_expr (loc, expr.get_start (), MAYBE_BASELINK_FUNCTIONS (t),\n>>\n>> I think it's probably preferable for check_splice_expr to handle getting a\n>> BASELINK, since tsubst_splice_expr.  Marek, thoughts?\n> \n> I think that's better.  It looks like we'll need MAYBE_BASELINK_FUNCTIONS\n> before the gcc_checking_assert at the end of check_splice_expr for the\n> get_template_info check.\n> \n> Marek\n>","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=hBnoHeTz;\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=hBnoHeTz","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 4fzz9c58fZz1yHB\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 21 Apr 2026 07:28:04 +1000 (AEST)","from vm01.sourceware.org (localhost [127.0.0.1])\n\tby sourceware.org (Postfix) with ESMTP id D91414B358BC\n\tfor <incoming@patchwork.ozlabs.org>; Mon, 20 Apr 2026 21:28:02 +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 7F3EA4BA5436\n for <gcc-patches@gcc.gnu.org>; Mon, 20 Apr 2026 21:27:34 +0000 (GMT)","from mail-qv1-f71.google.com (mail-qv1-f71.google.com\n [209.85.219.71]) by relay.mimecast.com with ESMTP with STARTTLS\n (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id\n us-mta-657-zYgV_xDQNKS4EPlzT3oNgw-1; Mon, 20 Apr 2026 17:27:32 -0400","by mail-qv1-f71.google.com with SMTP id\n 6a1803df08f44-8a22dbeeb96so68606066d6.3\n for <gcc-patches@gcc.gnu.org>; Mon, 20 Apr 2026 14:27:32 -0700 (PDT)","from [192.168.50.130]\n (130-44-146-247.s12789.c3-0.arl-cbr1.sbo-arl.ma.cable.rcncustomer.com.\n [130.44.146.247]) by smtp.gmail.com with ESMTPSA id\n 6a1803df08f44-8b02ae7d79esm84223036d6.36.2026.04.20.14.27.30\n (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);\n Mon, 20 Apr 2026 14:27:31 -0700 (PDT)"],"DKIM-Filter":["OpenDKIM Filter v2.11.0 sourceware.org D91414B358BC","OpenDKIM Filter v2.11.0 sourceware.org 7F3EA4BA5436"],"DMARC-Filter":"OpenDMARC Filter v1.4.2 sourceware.org 7F3EA4BA5436","ARC-Filter":"OpenARC Filter v1.0.0 sourceware.org 7F3EA4BA5436","ARC-Seal":"i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1776720454; cv=none;\n b=lRAzHgHoBl/81Tk5yhFKPAlnYdrQ7zYKRO7+7dxUEWETzf4SuF/iffszeIxE+lXgDZTEIHLPSkXZCNd/NYsfydNurZn8AVal4U3redmYD+Y2cHk6gk13z1vqXYC2VuGPSWWZJEPIJ8nxOkjUlrTap4Re+V7xTmbWxEc0yyChfP8=","ARC-Message-Signature":"i=1; a=rsa-sha256; d=sourceware.org; s=key;\n t=1776720454; c=relaxed/simple;\n bh=iULJGk6IWtJYVofMa2V2BajGCpHOpkfkfa7l8Fbsm/0=;\n h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From;\n b=xucGaZrsLT5VD3rXzfvSRVIVXoB20tmGaP0yrclwBMorF7l49BB6KJx8HhcIm+F+bHKACLODn3xSSwWkwT40frXomUXVPIppchZKbSRtRURXc2JxgjPiFR6RcQmCQbwwlMPiClJzGTIIXpqTDt7/99ulldjP5+S5GyyyVEH7SM8=","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=1776720454;\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 in-reply-to:in-reply-to:references:references;\n bh=MOGh/Dqrc3izbZv3ZxgWvPeatFEnk8k7VzFctcVjWHU=;\n b=hBnoHeTzN1eBWUarNxrOeHTY8TPR5DaWl1rmudnlE1WE8ynK5xoZmlZ8EOZdHNQcdFF1Mz\n lTNVfzzwO4FX7BTVHUfAe3MKBCTx4AzCxHuW93yJ/os+GAGy1/uKxdhgSUm1xfMa2MKNwY\n vXgZ60/0sQRiU0aWmB839YZP4IU/SUc=","X-MC-Unique":"zYgV_xDQNKS4EPlzT3oNgw-1","X-Mimecast-MFC-AGG-ID":"zYgV_xDQNKS4EPlzT3oNgw_1776720452","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20251104; t=1776720452; x=1777325252;\n h=content-transfer-encoding:in-reply-to:from:content-language\n :references:cc:to:subject:user-agent:mime-version:date:message-id\n :x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id\n :reply-to;\n bh=MOGh/Dqrc3izbZv3ZxgWvPeatFEnk8k7VzFctcVjWHU=;\n b=e6UGviq2Rtebbn7yzXJsGM6C4uIKs8VXcxitR0BMeHBZHUR2TGgEjKSYqyrMOGwQkm\n ADwhatKG5CAGZnwdNXnQNeIQpXzUw54jFZWmT+ytAH6lziTACbyfj6ep9Qda/yhdgBL0\n xLhOEGvl2WCmhtlP9go854vgx2D85BvYD7odlkxz5HmtWJVuHjEXFkZQKbURj2LORAVL\n GXPiyBVFctGW5Z/a1mT3fD8U9HKHE78dlAYHDQYnhDv1C6flti4o4GoPrggCve1Hqq+T\n PzF/FtX48o1iM/OdG/ngbU9fgQsqR0HpGtX9WkXOys41UzvFhBhJNYaeXeL76ZMKSyUw\n O/sg==","X-Forwarded-Encrypted":"i=1;\n AFNElJ+lvoLvi9b699/p2pNYC7b0ForBcJKVh1jry58wIdw5jAp6kaMtycG2EI5BCoQeROaXc7OsiXZMsB//Eg==@gcc.gnu.org","X-Gm-Message-State":"AOJu0YzvVhbUSSzvyrcRyn9759JxdpBA2rjRGLgqJGux9a0KCOafSAqD\n 1Thc4fD5ntq4DGyVg5jHAAhV+xaPkON2psGn1B9e/Gwl+IJRiquaKWGm80IaOUH81WFAGZ9Eg3M\n FonPi9FEd5uV8r/1mBnkDNeHT+Q0ViBZXT3h6jw/y7sfObsI2PxaIWhHn998=","X-Gm-Gg":"AeBDieuYoh2o669bbt257UNO3yacfj+HsE/hvmx5DvWp9JapJW58JX3ahLuoA4qooUe\n zqcihsDM1JatSIuA94C5pXv7QvF7X5fLJlvdVwSv22dgpkiA9loRaNPAfbWkDIn+x2Ox0Q+pCXD\n ODEqwlufF+2HG1vWL3de/HVQ+IgrKwhz+LFv8H4fNcBthTePFNQb5Gnfb3fbRP48D9WBSGnsifn\n 2GOxRGV80at9sbcqfEXSHk0LWHfyb0lHE0J1UWrGypx5pHolEHRXBNg1ZtWtj3G/souNb0z4SX6\n yRQYAgxbGeX35pBCcapdUZU2iSTbVBzF2vHEnnOySM8vKgIuaehOabQK7dJgtuHe4kbK8/KPSO1\n lIb9EFo8h+ji7yfXFOSi/EWwuFZhpgHOwLMa/zDtHxBNiAg/4UseVKLrCDAFU7KYhV1gJFcf96c\n Zt4jhKNJsmmRvTFyxdTYxzCddRTmQlezaYl6o3iOk7KQ==","X-Received":["by 2002:a05:6214:4c81:b0:8a4:7977:e5fa with SMTP id\n 6a1803df08f44-8b02818e86emr231207816d6.25.1776720452266;\n Mon, 20 Apr 2026 14:27:32 -0700 (PDT)","by 2002:a05:6214:4c81:b0:8a4:7977:e5fa with SMTP id\n 6a1803df08f44-8b02818e86emr231207346d6.25.1776720451702;\n Mon, 20 Apr 2026 14:27:31 -0700 (PDT)"],"Message-ID":"<82c59580-b3a7-46b8-b2ed-e47ad70289ef@redhat.com>","Date":"Mon, 20 Apr 2026 17:27:30 -0400","MIME-Version":"1.0","User-Agent":"Mozilla Thunderbird","Subject":"Re: [PATCH v2] c++/reflection: ICE on member function template\n splicing [PR124794]","To":"Marek Polacek <polacek@redhat.com>","Cc":"feedable <feedabl3@gmail.com>, gcc-patches@gcc.gnu.org","References":"<20260409201824.1440501-1-feedabl3@gmail.com>\n <9b2e103f-a71e-460a-89cc-4809e91dc533@redhat.com>\n <aeaDi_zEQ4HO-obX@redhat.com>","From":"Jason Merrill <jason@redhat.com>","In-Reply-To":"<aeaDi_zEQ4HO-obX@redhat.com>","X-Mimecast-Spam-Score":"0","X-Mimecast-MFC-PROC-ID":"lq4OYtupriKq3SwJEX5J93AGpvMcq7tI33bUeMSdzJU_1776720452","X-Mimecast-Originator":"redhat.com","Content-Language":"en-US","Content-Type":"text/plain; charset=UTF-8; format=flowed","Content-Transfer-Encoding":"7bit","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"}}]