From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 7BF453858D1E; Sun, 14 Jan 2024 17:14:29 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7BF453858D1E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1705252469; bh=E83JdYGi3RjhfgDKgRXgFMEoTNM+98PX8zoJDd0B1/4=; h=From:To:Subject:Date:From; b=NRhdNxdLhoDigHnlusriCQBVGLZSKSAe102UL+FT4ojL2Nj7n0gVuzp8sFsJxpAd7 3fRqn9nqVp1dOuY91NN9x2Kk/4xghpoCi54MbFQ37HSE8jfgAf1Era61/jUnch98HE LbTAKAGlDQHoK5Vs9Eg+8Zc94WtTvSYuNhYkr9Yo= From: "cooky.ykooc922 at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/113389] New: ICE when explicit object parameter is not declared as the first parameter Date: Sun, 14 Jan 2024 17:14:28 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 14.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: cooky.ykooc922 at gmail dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D113389 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: :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); | ^~~~~~ :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=3Dc++23: https://godbolt.org/z/Mxefo3nj6=