From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 6253C3858D28; Mon, 17 Oct 2022 11:17:53 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6253C3858D28 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1666005473; bh=oUmQVJ5/tIfy/1g078bhBGveqC53i6xRmTFW2pZQkiQ=; h=From:To:Subject:Date:From; b=qA4Jf9CL8lcGyviAPXzZiEmdgdzMMlYwCsMmwumRbyJWToZfw9R9RtHXKBk6Lsnfu nlTC3A+0tag9zfKCb3d/EtJFYGU2BBrxMKQ5HCICYvMcgmxEoSciAuBButX/Ac5X4P FmpBhYPmXK5n7Vy4g4uBD7ooXf7+qn7FlJBHBcvw= From: "asolokha at gmx dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/107291] New: [12/13 Regression] ICE in build_comparison_op, at cp/method.cc:1461 Date: Mon, 17 Oct 2022 11:17:37 +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: 13.0 X-Bugzilla-Keywords: ice-on-invalid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: asolokha at gmx 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 keywords 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=3D107291 Bug ID: 107291 Summary: [12/13 Regression] ICE in build_comparison_op, at cp/method.cc:1461 Product: gcc Version: 13.0 Status: UNCONFIRMED Keywords: ice-on-invalid-code Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: asolokha at gmx dot com Target Milestone: --- g++ 13.0.0 20221016 snapshot (g:6366e3e8847af98d4728d55951534769d034d02a) I= CEs when compiling the following testcase, extracted from test/CXX/class/class.compare/class.compare.default/p1.cpp from the flang 15= .0.1 test suite, w/ -std=3Dc++20: struct S4; bool operator=3D=3D(S4 const &, S4 const &) =3D default; % g++-13 -std=3Dc++20 -c ean6w24q.cpp ean6w24q.cpp:2:6: error: defaulted 'bool operator=3D=3D(const S4&, const S4= &)' is not a friend of 'S4' 2 | bool operator=3D=3D(S4 const &, S4 const &) =3D default; | ^~~~~~~~ ean6w24q.cpp: In function 'constexpr bool operator=3D=3D(const S4&, const S= 4&)': ean6w24q.cpp:2:6: internal compiler error: in build_comparison_op, at cp/method.cc:1461 0x6eb1f1 build_comparison_op(tree_node*, bool, int) =20=20=20=20=20=20=20 /var/tmp/portage/sys-devel/gcc-13.0.0_p20221016/work/gcc-13-20221016/gcc/cp= /method.cc:1461 0xa8dc5e synthesize_method(tree_node*) =20=20=20=20=20=20=20 /var/tmp/portage/sys-devel/gcc-13.0.0_p20221016/work/gcc-13-20221016/gcc/cp= /method.cc:1823 0xa34889 cp_finish_decl(tree_node*, tree_node*, bool, tree_node*, int) =20=20=20=20=20=20=20 /var/tmp/portage/sys-devel/gcc-13.0.0_p20221016/work/gcc-13-20221016/gcc/cp= /decl.cc:8594 0xb2ef94 cp_parser_init_declarator =20=20=20=20=20=20=20 /var/tmp/portage/sys-devel/gcc-13.0.0_p20221016/work/gcc-13-20221016/gcc/cp= /parser.cc:22895 0xb06cc9 cp_parser_simple_declaration =20=20=20=20=20=20=20 /var/tmp/portage/sys-devel/gcc-13.0.0_p20221016/work/gcc-13-20221016/gcc/cp= /parser.cc:15284 0xb3a9a1 cp_parser_declaration =20=20=20=20=20=20=20 /var/tmp/portage/sys-devel/gcc-13.0.0_p20221016/work/gcc-13-20221016/gcc/cp= /parser.cc:14970 0xb3b4e9 cp_parser_toplevel_declaration =20=20=20=20=20=20=20 /var/tmp/portage/sys-devel/gcc-13.0.0_p20221016/work/gcc-13-20221016/gcc/cp= /parser.cc:14991 0xb3b4e9 cp_parser_translation_unit =20=20=20=20=20=20=20 /var/tmp/portage/sys-devel/gcc-13.0.0_p20221016/work/gcc-13-20221016/gcc/cp= /parser.cc:5076 0xb3b4e9 c_parse_file() =20=20=20=20=20=20=20 /var/tmp/portage/sys-devel/gcc-13.0.0_p20221016/work/gcc-13-20221016/gcc/cp= /parser.cc:48860 0xc7bab1 c_common_parse_file() =20=20=20=20=20=20=20 /var/tmp/portage/sys-devel/gcc-13.0.0_p20221016/work/gcc-13-20221016/gcc/c-= family/c-opts.cc:1247=