From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 0D9503858D1E; Tue, 4 Oct 2022 06:26:04 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0D9503858D1E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1664864764; bh=bTPg1WVd/iJ75P7gtQ64gY1kZ1jOU9kvO9ZDwlGq/LU=; h=From:To:Subject:Date:From; b=vYmPn5jB8overPPbrd04GQtfSZpYQEB6wD2iCiXKMW3RPlWg5qd32kHEnwuYtFmK9 SObIi2a6sboIYksQcArAiRFnGFZPqfNwtht+ZnLX1EaCoN7l6xdhzvwZ+j6aGTA0rO SfOXNh2UJTS3z+TU1vOLW0I7CVoyKAulGuzwAV6o= From: "asolokha at gmx dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/107148] New: [10/11/12/13 Regression] ICE in bot_manip, at cp/tree.cc:3252 Date: Tue, 04 Oct 2022 06:26:03 +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=3D107148 Bug ID: 107148 Summary: [10/11/12/13 Regression] ICE in bot_manip, at cp/tree.cc:3252 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 20220925 snapshot (g:77bbf69d2981dafc2ef3e59bfbefb645d88bab9d) I= CEs when compiling the following testcase, reduced from test/Sema/stmt-expr-in-default-arg.cpp from the clang 15.0.1 test suite: template int bar(Callable &&Call) { return Call(); } int baz() { auto l =3D [](int a =3D ({ int x =3D 12; x; })) { return 1; }; return bar(l); } % g++-13.0.0 -c wi2ugigv.cpp wi2ugigv.cpp: In function 'int baz()': wi2ugigv.cpp:7:30: error: ISO C++ forbids in-class initialization of non-co= nst static member 'baz()::::x' 7 | auto l =3D [](int a =3D ({ int x =3D 12; x; })) { // expected-err= or {{default argument may not use a GNU statement expression}} | ^ wi2ugigv.cpp:7:38: error: 'x' was not declared in this scope 7 | auto l =3D [](int a =3D ({ int x =3D 12; x; })) { // expected-err= or {{default argument may not use a GNU statement expression}} | ^ wi2ugigv.cpp:7:23: error: could not convert '({...})' from 'void' to 'int' 7 | auto l =3D [](int a =3D ({ int x =3D 12; x; })) { // expected-err= or {{default argument may not use a GNU statement expression}} | ^~~~~~~~~~~~~~~~~~~~ | | | void wi2ugigv.cpp: In instantiation of 'int bar(Callable&&) [with Callable =3D baz()::&]': wi2ugigv.cpp:10:13: required from here wi2ugigv.cpp:3:14: internal compiler error: in bot_manip, at cp/tree.cc:3252 3 | return Call(); | ~~~~^~ 0x75052d bot_manip =20=20=20=20=20=20=20 /var/tmp/portage/sys-devel/gcc-13.0.0_p20220925/work/gcc-13-20220925/gcc/cp= /tree.cc:3252 0x14f3003 walk_tree_1(tree_node**, tree_node* (*)(tree_node**, int*, void*), void*, hash_set >*, tree_node* (*)(tree_node**, int*, tree_node* (*)(tree_node**, int*, void*), void*, hash_set >*)) =20=20=20=20=20=20=20 /var/tmp/portage/sys-devel/gcc-13.0.0_p20220925/work/gcc-13-20220925/gcc/tr= ee.cc:11249 0xbd29f8 break_out_target_exprs(tree_node*, bool) =20=20=20=20=20=20=20 /var/tmp/portage/sys-devel/gcc-13.0.0_p20220925/work/gcc-13-20220925/gcc/cp= /tree.cc:3333 0x96fd52 convert_default_arg(tree_node*, tree_node*, tree_node*, int, int) =20=20=20=20=20=20=20 /var/tmp/portage/sys-devel/gcc-13.0.0_p20220925/work/gcc-13-20220925/gcc/cp= /call.cc:8755 0x97d73f build_over_call =20=20=20=20=20=20=20 /var/tmp/portage/sys-devel/gcc-13.0.0_p20220925/work/gcc-13-20220925/gcc/cp= /call.cc:9655 0x981621 build_op_call(tree_node*, vec**, int) =20=20=20=20=20=20=20 /var/tmp/portage/sys-devel/gcc-13.0.0_p20220925/work/gcc-13-20220925/gcc/cp= /call.cc:5137 0xbad4a1 finish_call_expr(tree_node*, vec**, b= ool, bool, int) =20=20=20=20=20=20=20 /var/tmp/portage/sys-devel/gcc-13.0.0_p20220925/work/gcc-13-20220925/gcc/cp= /semantics.cc:2925 0xb59a1d tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, boo= l, bool) =20=20=20=20=20=20=20 /var/tmp/portage/sys-devel/gcc-13.0.0_p20220925/work/gcc-13-20220925/gcc/cp= /pt.cc:21204 0xb6f001 tsubst_expr(tree_node*, tree_node*, int, tree_node*, bool) =20=20=20=20=20=20=20 /var/tmp/portage/sys-devel/gcc-13.0.0_p20220925/work/gcc-13-20220925/gcc/cp= /pt.cc:19722 0xb7036f tsubst_expr(tree_node*, tree_node*, int, tree_node*, bool) =20=20=20=20=20=20=20 /var/tmp/portage/sys-devel/gcc-13.0.0_p20220925/work/gcc-13-20220925/gcc/cp= /pt.cc:18707 0xb6fdcd tsubst_expr(tree_node*, tree_node*, int, tree_node*, bool) =20=20=20=20=20=20=20 /var/tmp/portage/sys-devel/gcc-13.0.0_p20220925/work/gcc-13-20220925/gcc/cp= /pt.cc:19059 0xb837b6 tsubst_expr(tree_node*, tree_node*, int, tree_node*, bool) =20=20=20=20=20=20=20 /var/tmp/portage/sys-devel/gcc-13.0.0_p20220925/work/gcc-13-20220925/gcc/cp= /pt.cc:18683 0xb837b6 instantiate_body =20=20=20=20=20=20=20 /var/tmp/portage/sys-devel/gcc-13.0.0_p20220925/work/gcc-13-20220925/gcc/cp= /pt.cc:26657 0xb84994 instantiate_decl(tree_node*, bool, bool) =20=20=20=20=20=20=20 /var/tmp/portage/sys-devel/gcc-13.0.0_p20220925/work/gcc-13-20220925/gcc/cp= /pt.cc:26949 0xb903b3 instantiate_pending_templates(int) =20=20=20=20=20=20=20 /var/tmp/portage/sys-devel/gcc-13.0.0_p20220925/work/gcc-13-20220925/gcc/cp= /pt.cc:27027 0xa3e5cc c_parse_final_cleanups() =20=20=20=20=20=20=20 /var/tmp/portage/sys-devel/gcc-13.0.0_p20220925/work/gcc-13-20220925/gcc/cp= /decl2.cc:4917 0xc6e3cf c_common_parse_file() =20=20=20=20=20=20=20 /var/tmp/portage/sys-devel/gcc-13.0.0_p20220925/work/gcc-13-20220925/gcc/c-= family/c-opts.cc:1273=