From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 497223858003; Tue, 23 Nov 2021 05:39:52 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 497223858003 From: "asolokha at gmx dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/103373] New: ICE in add_constraint, at cp/constraint.cc:1077 Date: Tue, 23 Nov 2021 05:39:52 +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: 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 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, 23 Nov 2021 05:39:52 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D103373 Bug ID: 103373 Summary: ICE in add_constraint, at cp/constraint.cc:1077 Product: gcc Version: 12.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++-12.0.0-alpha20211121 snapshot (g:da17c304e22ba256eba0b03710aa329115163b= 08) ICEs when compiling the following testcase, reduced from test/CXX/temp/temp.constr/temp.constr.normal/p1.cpp from the clang 13.0.0 t= est suite, w/ -std=3Dc++20: template concept True =3D true; template concept True2 =3D sizeof(T) >=3D 0; template concept Foo2 =3D True2; template concept Bar2 =3D Foo2; namespace type_pack { template concept C1 =3D ((sizeof(Args) >=3D 0) && ...); template concept C2 =3D C1; template constexpr void foo() requires C2 { } template constexpr void foo() requires C1 && true { } static_assert((foo(), true)); } namespace PR47174 { template requires true struct S3; template requires true struct S3; } % g++-12.0.0 -std=3Dc++20 -c cmqenks0.cpp cmqenks0.cpp:27:22: error: forming pointer to reference type 'T&' 27 | requires true struct S3; | ^~~~~~~~ cmqenks0.cpp:27:22: internal compiler error: in add_constraint, at cp/constraint.cc:1077 0x67e3d6 add_constraint =20=20=20=20=20=20=20 /var/tmp/portage/sys-devel/gcc-12.0.0_alpha20211121/work/gcc-12-20211121/gc= c/cp/constraint.cc:1077 0x988ab2 add_constraint =20=20=20=20=20=20=20 /var/tmp/portage/sys-devel/gcc-12.0.0_alpha20211121/work/gcc-12-20211121/gc= c/cp/constraint.cc:1070 0x988ab2 add_constraint =20=20=20=20=20=20=20 /var/tmp/portage/sys-devel/gcc-12.0.0_alpha20211121/work/gcc-12-20211121/gc= c/cp/constraint.cc:1070 0x988b67 iterative_hash_constraint(tree_node*, unsigned int) =20=20=20=20=20=20=20 /var/tmp/portage/sys-devel/gcc-12.0.0_alpha20211121/work/gcc-12-20211121/gc= c/cp/constraint.cc:1090 0xa2e2a1 subsumption_hasher::hash(subsumption_entry*) =20=20=20=20=20=20=20 /var/tmp/portage/sys-devel/gcc-12.0.0_alpha20211121/work/gcc-12-20211121/gc= c/cp/logic.cc:737 0xa2e2a1 hash_table::find(subsumption_entry* const&) =20=20=20=20=20=20=20 /var/tmp/portage/sys-devel/gcc-12.0.0_alpha20211121/work/gcc-12-20211121/gc= c/hash-table.h:430 0xa2e2a1 lookup_subsumption =20=20=20=20=20=20=20 /var/tmp/portage/sys-devel/gcc-12.0.0_alpha20211121/work/gcc-12-20211121/gc= c/cp/logic.cc:763 0xa2e2a1 subsumes_constraints_nonnull =20=20=20=20=20=20=20 /var/tmp/portage/sys-devel/gcc-12.0.0_alpha20211121/work/gcc-12-20211121/gc= c/cp/logic.cc:795 0xa2e2a1 subsumes(tree_node*, tree_node*) =20=20=20=20=20=20=20 /var/tmp/portage/sys-devel/gcc-12.0.0_alpha20211121/work/gcc-12-20211121/gc= c/cp/logic.cc:842 0x98cc7d strictly_subsumes(tree_node*, tree_node*) =20=20=20=20=20=20=20 /var/tmp/portage/sys-devel/gcc-12.0.0_alpha20211121/work/gcc-12-20211121/gc= c/cp/constraint.cc:3488 0xb3e4db process_partial_specialization =20=20=20=20=20=20=20 /var/tmp/portage/sys-devel/gcc-12.0.0_alpha20211121/work/gcc-12-20211121/gc= c/cp/pt.c:5131 0xb41265 push_template_decl(tree_node*, bool) =20=20=20=20=20=20=20 /var/tmp/portage/sys-devel/gcc-12.0.0_alpha20211121/work/gcc-12-20211121/gc= c/cp/pt.c:5711 0xb41265 maybe_process_partial_specialization(tree_node*) =20=20=20=20=20=20=20 /var/tmp/portage/sys-devel/gcc-12.0.0_alpha20211121/work/gcc-12-20211121/gc= c/cp/pt.c:1042 0x9e0ae0 shadow_tag(cp_decl_specifier_seq*) =20=20=20=20=20=20=20 /var/tmp/portage/sys-devel/gcc-12.0.0_alpha20211121/work/gcc-12-20211121/gc= c/cp/decl.c:5409 0xae7883 cp_parser_single_declaration =20=20=20=20=20=20=20 /var/tmp/portage/sys-devel/gcc-12.0.0_alpha20211121/work/gcc-12-20211121/gc= c/cp/parser.c:31538 0xae7ba5 cp_parser_template_declaration_after_parameters =20=20=20=20=20=20=20 /var/tmp/portage/sys-devel/gcc-12.0.0_alpha20211121/work/gcc-12-20211121/gc= c/cp/parser.c:31162 0xae8450 cp_parser_explicit_template_declaration =20=20=20=20=20=20=20 /var/tmp/portage/sys-devel/gcc-12.0.0_alpha20211121/work/gcc-12-20211121/gc= c/cp/parser.c:31428 0xaeaf21 cp_parser_declaration =20=20=20=20=20=20=20 /var/tmp/portage/sys-devel/gcc-12.0.0_alpha20211121/work/gcc-12-20211121/gc= c/cp/parser.c:14786 0xaea4f9 cp_parser_toplevel_declaration =20=20=20=20=20=20=20 /var/tmp/portage/sys-devel/gcc-12.0.0_alpha20211121/work/gcc-12-20211121/gc= c/cp/parser.c:14876 0xaea4f9 cp_parser_declaration_seq_opt =20=20=20=20=20=20=20 /var/tmp/portage/sys-devel/gcc-12.0.0_alpha20211121/work/gcc-12-20211121/gc= c/cp/parser.c:14629=