From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id CE09A385ED4B; Fri, 30 Oct 2020 11:16:37 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org CE09A385ED4B From: "dimitri.gorokhovik at free dot fr" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/97639] New: [c++20,-fconcepts-ts] ICE: gcc_assert in tsubst, cp/pt.c:15464 Date: Fri, 30 Oct 2020 11:16: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: 11.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: dimitri.gorokhovik at free dot fr 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: Fri, 30 Oct 2020 11:16:37 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D97639 Bug ID: 97639 Summary: [c++20,-fconcepts-ts] ICE: gcc_assert in tsubst, cp/pt.c:15464 Product: gcc Version: 11.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: dimitri.gorokhovik at free dot fr Target Milestone: --- The code: template concept Term =3D true; template struct ss {}; template struct s { template constexpr static auto foo (ss ); }; constexpr auto g =3D [] (auto) { return 41; }; constexpr auto r =3D s <42> {}.foo (ss {}); when compiled as: g++ -fconcepts-ts -std=3Dc++20 -o bug-10.o -c bug-10.cpp produces: bug-10.cpp: In substitution of =E2=80=98template requires = (Term) && (Term) static constexpr auto s<42>::foo(ss) [with auto a =3D ; auto b =3D ]=E2=80=99: bug-10.cpp:10:46: required from here bug-10.cpp:10:46: internal compiler error: in tsubst, at cp/pt.c:15464 10 | constexpr auto r =3D s <42> {}.foo (ss {}); | ^ 0x6b046b tsubst(tree_node*, tree_node*, int, tree_node*) ../../src/gcc/cp/pt.c:15464 0xa66be6 unify ../../src/gcc/cp/pt.c:23443 0xa6689c unify ../../src/gcc/cp/pt.c:23640 0xa64a68 try_class_unification ../../src/gcc/cp/pt.c:22629 0xa65162 unify ../../src/gcc/cp/pt.c:23677 0xa62822 unify_one_argument ../../src/gcc/cp/pt.c:21850 0xa71a23 type_unification_real ../../src/gcc/cp/pt.c:21969 0xa7fe29 fn_type_unification(tree_node*, tree_node*, tree_node*, tree_node* const*, unsigned int, tree_node*, unification_kind_t, int, conversion**, bo= ol, bool) ../../src/gcc/cp/pt.c:21338 0x8d1c3d add_template_candidate_real ../../src/gcc/cp/call.c:3412 0x8d261c add_template_candidate ../../src/gcc/cp/call.c:3497 0x8d261c add_candidates ../../src/gcc/cp/call.c:5910 0x8d8ad4 add_candidates ../../src/gcc/cp/call.c:5825 0x8d8ad4 build_new_method_call_1 ../../src/gcc/cp/call.c:10330 0x8d9d7f build_new_method_call(tree_node*, tree_node*, vec**, tree_node*, int, tree_node**, int) ../../src/gcc/cp/call.c:10537 0xa1305c cp_parser_postfix_expression ../../src/gcc/cp/parser.c:7517 0x9f3c6a cp_parser_binary_expression ../../src/gcc/cp/parser.c:9652 0x9f59fe cp_parser_assignment_expression ../../src/gcc/cp/parser.c:9957 0x9f457d cp_parser_constant_expression ../../src/gcc/cp/parser.c:10251 0x9f4da1 cp_parser_initializer_clause ../../src/gcc/cp/parser.c:23404 0x9f978c cp_parser_initializer ../../src/gcc/cp/parser.c:23342 Please submit a full bug report, GCC version: g++ (GCC) 11.0.0 20201029 (experimental)=