From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id DA3313858D28; Tue, 14 Dec 2021 07:51:45 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DA3313858D28 From: "asolokha at gmx dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/103706] New: [11/12 Regression] ICE: tree check: accessed elt 1 of 'tree_vec' with 0 elts in hash, at cp/constraint.cc:2503 Date: Tue, 14 Dec 2021 07:51:45 +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: 12.0 X-Bugzilla-Keywords: 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 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 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Dec 2021 07:51:46 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D103706 Bug ID: 103706 Summary: [11/12 Regression] ICE: tree check: accessed elt 1 of 'tree_vec' with 0 elts in hash, at cp/constraint.cc:2503 Product: gcc Version: 12.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: asolokha at gmx dot com Target Milestone: --- g++ 12.0.0 20211212 snapshot (g:0b52083ea2c2dd9897031fdc3802a68fd4aa45ef) I= CEs when compiling the following testcase, extracted from test/SemaTemplate/concepts.cpp, w/ -std=3Dc++20: namespace PackInTypeConstraint { template concept C =3D sizeof(T) =3D=3D sizeof(in= t); template void g5() { ([]() -> C auto{ return T(); }(), ...); } template void g5(); } % g++-12.0.0 -std=3Dc++20 -c gpb6lyci.cpp gpb6lyci.cpp: In instantiation of 'void PackInTypeConstraint::g5() [with T = =3D {int, int, int}]': gpb6lyci.cpp:9:35: required from here gpb6lyci.cpp:6:15: internal compiler error: tree check: accessed elt 1 of 'tree_vec' with 0 elts in hash, at cp/constraint.cc:2503 6 | return T(); | ^ 0x869dcd tree_vec_elt_check_failed(int, int, char const*, int, char const*) =20=20=20=20=20=20=20 /var/tmp/portage/sys-devel/gcc-12.0.0_p20211212/work/gcc-12-20211212/gcc/tr= ee.c:8903 0x996fa5 tree_vec_elt_check(tree_node*, int, char const*, int, char const*) =20=20=20=20=20=20=20 /var/tmp/portage/sys-devel/gcc-12.0.0_p20211212/work/gcc-12-20211212/gcc/tr= ee.h:3662 0x996fa5 sat_hasher::hash(sat_entry*) =20=20=20=20=20=20=20 /var/tmp/portage/sys-devel/gcc-12.0.0_p20211212/work/gcc-12-20211212/gcc/cp= /constraint.cc:2503 0x992c43 hash_table::find_slot(sat_entry* const&, insert_option) =20=20=20=20=20=20=20 /var/tmp/portage/sys-devel/gcc-12.0.0_p20211212/work/gcc-12-20211212/gcc/ha= sh-table.h:435 0x992c43 satisfaction_cache::satisfaction_cache(tree_node*, tree_node*, sat_info) =20=20=20=20=20=20=20 /var/tmp/portage/sys-devel/gcc-12.0.0_p20211212/work/gcc-12-20211212/gcc/cp= /constraint.cc:2597 0x995e2e satisfy_atom =20=20=20=20=20=20=20 /var/tmp/portage/sys-devel/gcc-12.0.0_p20211212/work/gcc-12-20211212/gcc/cp= /constraint.cc:2913 0x995e2e satisfy_constraint_r =20=20=20=20=20=20=20 /var/tmp/portage/sys-devel/gcc-12.0.0_p20211212/work/gcc-12-20211212/gcc/cp= /constraint.cc:3022 0x9966d3 satisfy_normalized_constraints =20=20=20=20=20=20=20 /var/tmp/portage/sys-devel/gcc-12.0.0_p20211212/work/gcc-12-20211212/gcc/cp= /constraint.cc:3047 0x99437f satisfy_nondeclaration_constraints =20=20=20=20=20=20=20 /var/tmp/portage/sys-devel/gcc-12.0.0_p20211212/work/gcc-12-20211212/gcc/cp= /constraint.cc:3137 0x99437f constraint_satisfaction_value =20=20=20=20=20=20=20 /var/tmp/portage/sys-devel/gcc-12.0.0_p20211212/work/gcc-12-20211212/gcc/cp= /constraint.cc:3289 0x996794 constraints_satisfied_p(tree_node*, tree_node*) =20=20=20=20=20=20=20 /var/tmp/portage/sys-devel/gcc-12.0.0_p20211212/work/gcc-12-20211212/gcc/cp= /constraint.cc:3321 0xb10490 do_auto_deduction(tree_node*, tree_node*, tree_node*, int, auto_deduction_context, tree_node*, int) =20=20=20=20=20=20=20 /var/tmp/portage/sys-devel/gcc-12.0.0_p20211212/work/gcc-12-20211212/gcc/cp= /pt.c:30019 0xbbcd18 check_return_expr(tree_node*, bool*) =20=20=20=20=20=20=20 /var/tmp/portage/sys-devel/gcc-12.0.0_p20211212/work/gcc-12-20211212/gcc/cp= /typeck.c:10423 0xb64f7f finish_return_stmt(tree_node*) =20=20=20=20=20=20=20 /var/tmp/portage/sys-devel/gcc-12.0.0_p20211212/work/gcc-12-20211212/gcc/cp= /semantics.c:1193 0xb2bdd8 tsubst_expr(tree_node*, tree_node*, int, tree_node*, bool) =20=20=20=20=20=20=20 /var/tmp/portage/sys-devel/gcc-12.0.0_p20211212/work/gcc-12-20211212/gcc/cp= /pt.c:18235 0xb2bd7b tsubst_expr(tree_node*, tree_node*, int, tree_node*, bool) =20=20=20=20=20=20=20 /var/tmp/portage/sys-devel/gcc-12.0.0_p20211212/work/gcc-12-20211212/gcc/cp= /pt.c:18582 0xb419e6 tsubst_expr(tree_node*, tree_node*, int, tree_node*, bool) =20=20=20=20=20=20=20 /var/tmp/portage/sys-devel/gcc-12.0.0_p20211212/work/gcc-12-20211212/gcc/cp= /pt.c:18211 0xb419e6 tsubst_lambda_expr(tree_node*, tree_node*, int, tree_node*) =20=20=20=20=20=20=20 /var/tmp/portage/sys-devel/gcc-12.0.0_p20211212/work/gcc-12-20211212/gcc/cp= /pt.c:19583 0xb17eb2 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-12.0.0_p20211212/work/gcc-12-20211212/gcc/cp= /pt.c:21074 0xb1638a 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-12.0.0_p20211212/work/gcc-12-20211212/gcc/cp= /pt.c:20412=