[Bug c++/123186] [16 Regression] internal compiler error: in lookup_member, at cp/search.cc:1197 since r16-6145

ppalka at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Thu Dec 18 13:50:33 GMT 2025


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=123186

Patrick Palka <ppalka at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
           Assignee|unassigned at gcc dot gnu.org      |ppalka at gcc dot gnu.org

--- Comment #5 from Patrick Palka <ppalka at gcc dot gnu.org> ---
(In reply to Jakub Jelinek from comment #4)
> Makes me wonder if the bug isn't that we pass a TYPE_DECL rather than
> IDENTIFIER_NODE to build_typename_type.  So perhaps:
> --- gcc/cp/parser.cc.jj	2025-12-17 15:21:21.045719368 +0100
> +++ gcc/cp/parser.cc	2025-12-18 11:11:56.074952675 +0100
> @@ -20435,7 +20435,7 @@ cp_parser_template_id (cp_parser *parser
>  				   fullname, arguments);
>        TREE_TYPE (templ)
>  	= build_typename_type (TYPE_CONTEXT (TREE_TYPE (templ)),
> -			       TYPE_NAME (TREE_TYPE (templ)),
> +			       TYPE_IDENTIFIER (TREE_TYPE (templ)),
>  			       fullname,
>  			       get_typename_tag (TREE_TYPE (templ)));
>        template_id = templ;
> ?
Oops, yes that definitely should be TYPE_IDENTIFIER.


More information about the Gcc-bugs mailing list