From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id DCD00385B83B; Sat, 18 Sep 2021 08:02:43 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DCD00385B83B From: "dangelog at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/102396] New: ICE when using concepts, in get, at cp/constraint.cc:2637 Date: Sat, 18 Sep 2021 08:02:43 +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: dangelog at gmail 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: Sat, 18 Sep 2021 08:02:44 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D102396 Bug ID: 102396 Summary: ICE when using concepts, in get, at cp/constraint.cc:2637 Product: gcc Version: 12.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: dangelog at gmail dot com Target Milestone: --- Hello, This testcase (which gets accepted by Clang and MSVC) causes an ICE under GCC-12-trunk, and an erroneous compilation error on GCC 11.2. #include #include #include #include template struct S; template constexpr bool is_S =3D false; template constexpr bool is_S> =3D true; template struct S { T data; S(); explicit S(const T &); template , bool> =3D false> requires std::equality_comparable_with friend bool operator=3D=3D(const S &s, const U &u) { return s.data =3D= =3D u; } }; template bool operator=3D=3D(const S &a, const S &b) { return a.data =3D=3D b.= data; } int main() { using SD =3D S; char data[sizeof(SD) * 10]; std::span span((SD*)std::begin(data), (SD*)std::end(data)); //static_assert(std::equality_comparable::iterator>); std::ranges::uninitialized_default_construct(span); } The error: /opt/compiler-explorer/gcc-trunk-20210918/include/c++/12.0.0/concepts:280:1= 7: internal compiler error: in get, at cp/constraint.cc:2637 280 | { __t =3D=3D __u } -> __boolean_testable; | ~~~~^~~~~~ 0x1fc77b9 internal_error(char const*, ...) ???:0 0x713d19 fancy_abort(char const*, int, char const*) ???:0 0x7970af satisfaction_cache::get() ???:0 0x79cd8a constraints_satisfied_p(tree_node*, tree_node*) ???:0 0x9ba323 fn_type_unification(tree_node*, tree_node*, tree_node*, tree_node* const*, unsigned int, tree_node*, unification_kind_t, int, conversion**, bo= ol, bool) ???:0 0x73f150 build_new_op(op_location_t const&, tree_code, int, tree_node*, tree_node*, tree_node*, tree_node**, int) ???:0 0xa2fc50 build_x_binary_op(op_location_t const&, tree_code, tree_node*, tree_code, tree_node*, tree_code, tree_node**, int) ???:0 0x79cd42 tsubst_requires_expr(tree_node*, tree_node*, int, tree_node*) ???:0 0x79cd8a constraints_satisfied_p(tree_node*, tree_node*) ???:0 0x9ba323 fn_type_unification(tree_node*, tree_node*, tree_node*, tree_node* const*, unsigned int, tree_node*, unification_kind_t, int, conversion**, bo= ol, bool) ???:0 0x73f150 build_new_op(op_location_t const&, tree_code, int, tree_node*, tree_node*, tree_node*, tree_node**, int) ???:0 0xa2fc50 build_x_binary_op(op_location_t const&, tree_code, tree_node*, tree_code, tree_node*, tree_code, tree_node**, int) ???:0 0x9816d7 instantiate_decl(tree_node*, bool, bool) ???:0 0x9c3e1b instantiate_pending_templates(int) ???:0 0x82a899 c_parse_final_cleanups() ???:0=