From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 3A6233858436; Wed, 11 Oct 2023 19:58:40 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3A6233858436 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1697054320; bh=9Ticig8lB2U470OfD3cn0hB74cLMZ8pP2qpo7q0O2JE=; h=From:To:Subject:Date:From; b=GKHxpq8dJhf39jkf9cvNscmegZIMS5ne2+TFMJfr3OuMqy5cWeUjWCtEq2OSqsTRX X62wXdWw19Q18eU8fh59oi619KxaU4joeiy0wEY1lyWeuWm0qH2ZCRIfFH46an8k/H 6BbOITF0ys3PsI4vlaBYOlJ2ljqZGjwwltR1CD4w= From: "leni536 at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/111776] New: ICE on delete expression with multiple viable destroying operator delete Date: Wed, 11 Oct 2023 19:58:39 +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.2.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: leni536 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 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D111776 Bug ID: 111776 Summary: ICE on delete expression with multiple viable destroying operator delete Product: gcc Version: 13.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: leni536 at gmail dot com Target Milestone: --- version: gcc 13.2.0 flags: -std=3Dc++20 -O2 -pedantic-errors ``` #include struct B { void operator delete(B* ptr, std::destroying_delete_t); }; struct D : B { void operator delete(D* ptr, std::destroying_delete_t); using B::operator delete; }; void bar(D* ptr) { delete ptr; } ``` internal compiler error: in build_op_delete_call, at cp/call.cc:7914 13 | delete ptr; | ^~~ 0x1ce7bde internal_error(char const*, ...) ???:0 0x7290fc fancy_abort(char const*, int, char const*) ???:0 0x7eb68c build_delete(unsigned int, tree_node*, tree_node*, special_function_kind, int, int, int) ???:0 0x7d3757 delete_sanity(unsigned int, tree_node*, tree_node*, bool, int, int) ???:0 0x89fd5b c_parse_file() ???:0 0x98c5d9 c_common_parse_file() ???:0 https://godbolt.org/z/8rh7h7EWz I'm not entirely sure what should actually happen here. I didn't find a disambiguating rule at https://timsong-cpp.github.io/cppwp/n4868/expr.delet= e#10 .=