[{"id":3675383,"web_url":"http://patchwork.ozlabs.org/comment/3675383/","msgid":"<adfMgCshzjcapdyR@redhat.com>","list_archive_url":null,"date":"2026-04-09T15:57:52","subject":"Re: [PATCH] c++/reflection: ICE on member function template splicing\n [PR124794]","submitter":{"id":14370,"url":"http://patchwork.ozlabs.org/api/people/14370/","name":"Marek Polacek","email":"polacek@redhat.com"},"content":"On Thu, Apr 09, 2026 at 06:35:54PM +0300, feedable wrote:\n> cp_parser_splice_expression isn't aware of overload sets in BASELINKs, which may\n> happen when reflecting a non-static member function template, so it treats them\n> like it would free functions.\n> To fix that we reintroduce the BASELINK to finish_id_expression, and pull the\n> scope from the BASELINK.\n> \n> A similar issue occurs in cp_parser_splice_specifier, where additional angle\n> bracket parsing gets confused by BASELINKs and decides not to parse the\n> splice-specialization-specifier.\n> Strip BASELINKs for the purposes of checking and grab the data from the\n> reflection for actual use.\n\nThanks for the patch, but please next time make a comment in the Bugzilla\nthat you're working on the problem.\n\n> \tPR c++/124794\n> \n> gcc/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> \n> gcc/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\n> \n> diff --git a/gcc/cp/parser.cc b/gcc/cp/parser.cc\n> index 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\nmaybe_get_first_fn\n\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\nThis code changed about two months ago; we no longer pass ctx to\nfinish_id_expression.  Please adjust.\n\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,\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\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=BLCEry1Q;\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=BLCEry1Q","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 4fs4NT7194z1yD3\n\tfor <incoming@patchwork.ozlabs.org>; Fri, 10 Apr 2026 01:58:32 +1000 (AEST)","from vm01.sourceware.org (localhost [127.0.0.1])\n\tby sourceware.org (Postfix) with ESMTP id 27ACE4BA2E1F\n\tfor <incoming@patchwork.ozlabs.org>; Thu,  9 Apr 2026 15:58:30 +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 0CF684BA2E19\n for <gcc-patches@gcc.gnu.org>; Thu,  9 Apr 2026 15:57:59 +0000 (GMT)","from mail-qk1-f199.google.com (mail-qk1-f199.google.com\n [209.85.222.199]) by relay.mimecast.com with ESMTP with STARTTLS\n (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id\n us-mta-190-pnmKh54WO1uWf7fJ8wMTMQ-1; Thu, 09 Apr 2026 11:57:57 -0400","by mail-qk1-f199.google.com with SMTP id\n af79cd13be357-8d5010ea6b5so208346085a.0\n for <gcc-patches@gcc.gnu.org>; Thu, 09 Apr 2026 08:57:57 -0700 (PDT)","from redhat.com ([2603:7000:9500:10::1db4])\n by smtp.gmail.com with ESMTPSA id\n af79cd13be357-8d2a806b2b2sm1816160685a.25.2026.04.09.08.57.54\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Thu, 09 Apr 2026 08:57:54 -0700 (PDT)"],"DKIM-Filter":["OpenDKIM Filter v2.11.0 sourceware.org 27ACE4BA2E1F","OpenDKIM Filter v2.11.0 sourceware.org 0CF684BA2E19"],"DMARC-Filter":"OpenDMARC Filter v1.4.2 sourceware.org 0CF684BA2E19","ARC-Filter":"OpenARC Filter v1.0.0 sourceware.org 0CF684BA2E19","ARC-Seal":"i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1775750279; cv=none;\n b=FraFx2TZxNYzXSEWZrgYC7FVmuAEMjDXxLlsfqtcjkwEMfCAz4n29IYymzlm5i68idiRDsZEfJRELkeyHXftxrr6JbsL0o/VkzdjRTtaE69Su8XAZZqRB51mbXMBFw4lv8DlG5GuOv5wWTH8L4+X4kCbWm6XmMHppJ3Hb39rT2I=","ARC-Message-Signature":"i=1; a=rsa-sha256; d=sourceware.org; s=key;\n t=1775750279; c=relaxed/simple;\n bh=Skluie+s5I3X4l0HrL6utH2nse1qfmZjRxN6AOFvPBw=;\n h=DKIM-Signature:Date:From:To:Subject:Message-ID:MIME-Version;\n b=t8ncSpudbT0o+9RNzNzmGFb1JiZdOVXNRVQSoHC2Co1YnPD3g2xR/GltH+TfUsuZ/BVTdaAcSb7avLEo+8YEGDf683I8MIW1QhXLtGCXRd0MVx72t96l6Mzkhr8N10H5cbMXww2IxnIApCZNjBFhqHHUv3nXoDzYHdVZQiZmVHw=","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=1775750278;\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=6NnKZaVJ+zRvyW98OfjqW5ycSmYxavg/WEns/pNk21c=;\n b=BLCEry1Qc3ReqJYGNbYr1h4AzseeWuOj8KA6DDlZcfZb/u8m42B89ZtwaivK/YWMXyUla+\n dZ+M5QNWodM8lnlEvrq0gjU/wj8zbeBFCj8scmyhtHRwGZjfeZy9Lz1KsOHqltR+qYs0kT\n RMNM1X8caQMp4ekqHPecnNyFXmYtepM=","X-MC-Unique":"pnmKh54WO1uWf7fJ8wMTMQ-1","X-Mimecast-MFC-AGG-ID":"pnmKh54WO1uWf7fJ8wMTMQ_1775750276","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20251104; t=1775750276; x=1776355076;\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=6NnKZaVJ+zRvyW98OfjqW5ycSmYxavg/WEns/pNk21c=;\n b=pp7lcI4l5HZ6CYPtxSg2pa1szD1Bw6+DKjTyxs1a2EylVXe+G5himipWQzuVATxBmH\n 2RJ9fdBcdH99rbixxIenmdnyv/AfrrApUrYBgJ60QfJY/Gko8KVEZGlZjmmeFZq2wNeM\n LapNzm1zb5OCLojtxU1AU51kau8QZ0dU5k01lbTdP3dWDJ8+7y7plqROOO1hcZOk2WKx\n meHQzjxvcnVM21+8WpI1A5cXvZonsi3u0CMwmQKqmU3Fvkpm/Hn66QwhuY0xCb5wyCwr\n SB7H2m8ssnjebhLJpTThJ2CCpkQwv6l96ulLOqN6CPb8J/1abdSmr+RaCkp5rWln0l1y\n Viwg==","X-Gm-Message-State":"AOJu0YzV4AjEYsZv4pqfBUfsN/QX1DQcKt+BI723s3jGEsbee/oIf7Zd\n q3hE7uMgJdOdgrhxyBMs+FnxkdQp2YwA1LI8R9fvazojny04De2MYn3ZPmPEauOGvz5aNrE9mye\n NhZj7x3DgCgOtoUhAqVsOFD8U3K70UbJzZkp0js9LQ2iNf+6A6BRu2I/ZgmvVRvt3Cg0=","X-Gm-Gg":"AeBDiesU0PT1QBztwYMCdJE0eQI2kbQXs06T6PLbxx3tzf7LEWWFcP6ylpL2Z/NyIGM\n MYl/FsKxmGVhOR1WmtW65LcgAc0hoECkPmSLGlSRnNb94ntLyVcr35opk3Se0XWo/3ebWwknfEb\n JemUzCyYWPSjIzN1vkHVo0bceTSmsVg8Ce5XUepbN/ES0cXxo3ihva9hdm7TW3d0QXFPw0f425U\n z2bOSSaf8HjpVY91qgeDyqvXy2JsXiDFPtWC7h9At08Fnrv7exghrb68Jii62zuEalaMOv1Edkg\n pE+GgA6Ff7jtsliv+A7pGvTiOm6o1SJ8eJk6FLdo+lNuDghcWZhO8stAJqvuzc+9mQp3T2cWbkt\n qAg==","X-Received":["by 2002:a05:620a:254a:b0:8cd:8d4c:aa0c with SMTP id\n af79cd13be357-8d4187c8f21mr3710030985a.0.1775750275599;\n Thu, 09 Apr 2026 08:57:55 -0700 (PDT)","by 2002:a05:620a:254a:b0:8cd:8d4c:aa0c with SMTP id\n af79cd13be357-8d4187c8f21mr3710026585a.0.1775750274948;\n Thu, 09 Apr 2026 08:57:54 -0700 (PDT)"],"Date":"Thu, 9 Apr 2026 11:57:52 -0400","From":"Marek Polacek <polacek@redhat.com>","To":"feedable <feedabl3@gmail.com>","Cc":"gcc-patches@gcc.gnu.org","Subject":"Re: [PATCH] c++/reflection: ICE on member function template splicing\n [PR124794]","Message-ID":"<adfMgCshzjcapdyR@redhat.com>","References":"<20260409153553.977800-2-feedabl3@gmail.com>","MIME-Version":"1.0","In-Reply-To":"<20260409153553.977800-2-feedabl3@gmail.com>","User-Agent":"Mutt/2.3.1 (2026-03-20)","X-Mimecast-Spam-Score":"0","X-Mimecast-MFC-PROC-ID":"OrmdoR4-_Ovknx1WcPgv2vFOxtJkbb4WJnGMEQZpkoA_1775750276","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":3675503,"web_url":"http://patchwork.ozlabs.org/comment/3675503/","msgid":"<9cf1fee1-3b63-4c4f-a73d-318c9837ca33@gmail.com>","list_archive_url":null,"date":"2026-04-09T20:38:43","subject":"Re: [PATCH] c++/reflection: ICE on member function template splicing\n [PR124794]","submitter":{"id":92146,"url":"http://patchwork.ozlabs.org/api/people/92146/","name":"feedable","email":"feedabl3@gmail.com"},"content":"Hi, please take a look at the new version here: https://gcc.gnu.org/pipermail/gcc-patches/2026-April/712609.html\n\nOn 4/9/26 6:57 PM, Marek Polacek wrote:\n\n> On Thu, Apr 09, 2026 at 06:35:54PM +0300, feedable wrote:\n>> cp_parser_splice_expression isn't aware of overload sets in BASELINKs, which may\n>> happen when reflecting a non-static member function template, so it treats them\n>> like it would free functions.\n>> To fix that we reintroduce the BASELINK to finish_id_expression, and pull the\n>> scope from the BASELINK.\n>>\n>> A similar issue occurs in cp_parser_splice_specifier, where additional angle\n>> bracket parsing gets confused by BASELINKs and decides not to parse the\n>> splice-specialization-specifier.\n>> Strip BASELINKs for the purposes of checking and grab the data from the\n>> reflection for actual use.\n> Thanks for the patch, but please next time make a comment in the Bugzilla\n> that you're working on the problem.\n\nAh, sorry, I just got confused when there seemingly was no option to assign myself to an issue. Will do next time!\n\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> This code changed about two months ago; we no longer pass ctx to\n> finish_id_expression.  Please adjust.\n\nHmm, this changes things considerably: apparently there is also code to handle BASELINKs now too, which is unused because those are stripped.","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=VBc8y0Vi;\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=VBc8y0Vi","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.221.45"],"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 4fsBcP4rYrz1yHG\n\tfor <incoming@patchwork.ozlabs.org>; Fri, 10 Apr 2026 06:39:16 +1000 (AEST)","from vm01.sourceware.org (localhost [127.0.0.1])\n\tby sourceware.org (Postfix) with ESMTP id 52BB54BA2E2A\n\tfor <incoming@patchwork.ozlabs.org>; Thu,  9 Apr 2026 20:39:14 +0000 (GMT)","from mail-wr1-f45.google.com (mail-wr1-f45.google.com\n [209.85.221.45])\n by sourceware.org (Postfix) with ESMTPS id 5942F4BA2E0D\n for <gcc-patches@gcc.gnu.org>; Thu,  9 Apr 2026 20:38:46 +0000 (GMT)","by mail-wr1-f45.google.com with SMTP id\n ffacd0b85a97d-43d64313c39so100812f8f.3\n for <gcc-patches@gcc.gnu.org>; Thu, 09 Apr 2026 13:38:46 -0700 (PDT)","from ?IPV6:2a02:8308:900b:fc00::1bf9? ([2a02:8308:900b:fc00::1bf9])\n by smtp.gmail.com with ESMTPSA id\n ffacd0b85a97d-43d63e468d0sm1661414f8f.18.2026.04.09.13.38.44\n (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);\n Thu, 09 Apr 2026 13:38:44 -0700 (PDT)"],"DKIM-Filter":["OpenDKIM Filter v2.11.0 sourceware.org 52BB54BA2E2A","OpenDKIM Filter v2.11.0 sourceware.org 5942F4BA2E0D"],"DMARC-Filter":"OpenDMARC Filter v1.4.2 sourceware.org 5942F4BA2E0D","ARC-Filter":"OpenARC Filter v1.0.0 sourceware.org 5942F4BA2E0D","ARC-Seal":"i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1775767126; cv=none;\n b=QAhPZ9BTQ8M+vD7BHfntuQIgKQ+OuQ5arDk6+kOO3j+sRYGuG5DJFWRCWTkzbHxd17jc5e1hPw7AcLAuUDE49HDN7aIynX7RTOKTD7kTi4HYZyGnnnKBQqyJFDXxRPgqmmndjBxU5tihj5RQW+Ryb804Mvd1LB3zWsSXyoKmUDc=","ARC-Message-Signature":"i=1; a=rsa-sha256; d=sourceware.org; s=key;\n t=1775767126; c=relaxed/simple;\n bh=sjcjbeIYZE1hEv6CvDDMw8qiOGS7UmgrWYGIYk1HcfE=;\n h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From;\n b=s9RhN7qimsodJUdD+n/sAvCf9/jbO4guO62vFi/Dc9N/i4WKy7yzxcKcW92E3uI3HFglPtC9GGSKpwAGFLtlmHchrKXb3gGGxO4mn2gUiG3VOXiaW2RB6vBGZW9qBvuW2x/T5mMl0fIf4nkqCtx3clBNerTy5170PYUyzl0nV7g=","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=1775767125; x=1776371925; 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=s3Rak5Q/UZ24tAbtmp0PP9yudG3TX68EMtwQ2CYTIxs=;\n b=VBc8y0VifJ/QvMyVLJna+D1nDM0pIW+GZZWROedCbFRkcve6xvrcds54r3R9ebXrVR\n tEIGrOOLRUHgeRfIJxLk/PtWidTwReND0EzYe+0VVftXIepWHb1BgzGuszJzt6rSxVf5\n oASLRTS+2hvBtWPB1edJ9+/5nNprbMaXPBwbGjDHj7IxKp3kji8dpwkQbC6PoD/n607r\n P+EaMSxe1C9iA/T9bNb6oKhV4sk5tSan6s56PG3LmpQkkpl4xMXQsX6g5XR6/eH921EA\n T4GXvEvEleqY8AHp7p2tz7d0AaBwzqAKRl6TXisUmkXIdZS5euV8SC4RK7JSuGX0GitA\n FuCg==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20251104; t=1775767125; x=1776371925;\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=s3Rak5Q/UZ24tAbtmp0PP9yudG3TX68EMtwQ2CYTIxs=;\n b=Cpknt/pKUotOqT8/3MmkWvLi2YZYGJ+ZTvKBh75XSex7d3QasX0O5gRtcU9nGCi0ZE\n aWFUqR18+BheGAB1/X9AG3s7jG+lQUh2K9yOmQNK48X9P6k6Ghvnz5OeJQKWHPkARp+B\n d3Z+lV+ZxisPH5hqw7FADrpuYVwzLj88B3LXkNH4oYVrc5cWHbIEdb07MSMpn0IR+mMZ\n V3kPmhhXZhVDoZZQq3tGATZHVDJbhvfeS7XNA/vFCqUYOM28xIR/X/LecAn2WO8CGUkc\n gYphK/MJ/hPuMGVBnjgPKd8O1DI/hNgdJoSeqqbl5SlXJVyIZlql+Wup7n0o5jjoz6WL\n KALg==","X-Gm-Message-State":"AOJu0YwKx5mVTx+4LB4vUK854sLvyHKuXMVdEjY1Ii4UBVBPQJVQ/7eo\n Csz3xIgBqZG1BdZKIdRhgTFFZWix6f9KAtHTD6XAFo6hWmOtfKs2krQq","X-Gm-Gg":"AeBDievntjFQbmhOVp/40x0a18oOc9UYrUUPCiysx7PIZK8v2G4fdP1B8qeJRWfvKBx\n nmL95J/nyT6vciR9+5onGIfc00/y391Pn1WTuxluaL3WqcVLpm4CGcMEeMH1+Q1Yv3OTK0lWrrG\n Ry5qe9LiWc7ThofKwo6yAKbIgWd8Xdpsam2XEfCptWj9Bmr1IPhTH3igGP9jsSyegDV/5Nf+BgJ\n vVSiIPqBPWIXri7cKEcH7dSUj+hDO8v1gQkPr8ocVJK64Ol3/C4TmoVC5R5d38ijJo9WScqePzU\n MT5uGZY1YhbtpohPBoyIu9WIgqBhSgugrXXJaPRGbd3vintXbkltgBa151qxzOVkWvthAclrr6j\n O7x8eY/RVAtVkfghfQVN2uMN+oe2swn4345LnxjKDHnwCYLyosqzWXyolSqt7zb4kh4Cdv0HYh2\n h7rc2/7llh55Vy8WlljK+rChzLg8Oy23SBZPU=","X-Received":"by 2002:a05:6000:2001:b0:43d:1deb:a622 with SMTP id\n ffacd0b85a97d-43d641c9959mr771545f8f.0.1775767125073;\n Thu, 09 Apr 2026 13:38:45 -0700 (PDT)","Message-ID":"<9cf1fee1-3b63-4c4f-a73d-318c9837ca33@gmail.com>","Date":"Thu, 9 Apr 2026 23:38:43 +0300","MIME-Version":"1.0","User-Agent":"Mozilla Thunderbird","Subject":"Re: [PATCH] c++/reflection: ICE on member function template splicing\n [PR124794]","To":"Marek Polacek <polacek@redhat.com>","Cc":"gcc-patches@gcc.gnu.org","References":"<20260409153553.977800-2-feedabl3@gmail.com>\n <adfMgCshzjcapdyR@redhat.com>","Content-Language":"en-US","From":"feedable <feedabl3@gmail.com>","In-Reply-To":"<adfMgCshzjcapdyR@redhat.com>","Content-Type":"text/plain; charset=UTF-8; format=flowed","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"}}]