https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113389
Bug ID: 113389 Summary: ICE when explicit object parameter is not declared as the first parameter Product: gcc Version: 14.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: cooky.ykooc922 at gmail dot com Target Milestone: --- Although it is obviously an error, it causes ICE: struct A { void foo(A, this A); }; compiler output: <source>:3:17: error: Only the first parameter of a member function can be declared as an explicit object parameter 3 | void foo(A, this A); | ^~~~~~ <source>:3:23: internal compiler error: Segmentation fault 3 | void foo(A, this A); | ^ 0x2640d5c internal_error(char const*, ...) ???:0 0xa78793 perform_implicit_conversion_flags(tree_node*, tree_node*, int, int) ???:0 0xb18083 check_default_argument(tree_node*, tree_node*, int) ???:0 0xb1861f grokparms(tree_node*, tree_node**) ???:0 0xb2caa1 grokdeclarator(cp_declarator const*, cp_decl_specifier_seq*, decl_context, int, tree_node**) ???:0 0xb50ff3 grokfield(cp_declarator const*, cp_decl_specifier_seq*, tree_node*, bool, tree_node*, tree_node*) ???:0 0xc5214a c_parse_file() ???:0 0xda5b49 c_common_parse_file() ???:0 godbolt link with -std=c++23: https://godbolt.org/z/Mxefo3nj6