From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 106413858D3C; Sat, 17 Jun 2023 19:05:51 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 106413858D3C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1687028751; bh=rG3lSg7d+//3GyNS5vYz+8mwYwXtfuFzvEQUshmqSrI=; h=From:To:Subject:Date:In-Reply-To:References:From; b=IhrBvvMu0yhIYZ+9tHURWWy/60RWDCoesGAly8nsKts7HQE5L8znvzWA0AotVa/CY E8csLKVqqBofhpBVnTiFfqM9CnG/fJ8qoWtpwZsTDy044/QvF/gfnBj80k//iJ9pdb c2YMiifR3KL0N38+id7cj9b/HhYx9E0vjDEudTpo= From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/110295] [10/11/12/13/14 Regression] ICE in dwarf2out_finish with local class with inherited operator delete in a templated function and -g Date: Sat, 17 Jun 2023 19:05:50 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 11.4.0 X-Bugzilla-Keywords: ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: pinskia at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 10.5 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: short_desc target_milestone everconfirmed cf_known_to_work cf_known_to_fail bug_status keywords cf_reconfirmed_on Message-ID: In-Reply-To: References: 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=3D110295 Andrew Pinski changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|internal compiler error: in |[10/11/12/13/14 Regression] |dwarf2out_finish |ICE in dwarf2out_finish | |with local class with | |inherited operator delete | |in a templated function and | |-g Target Milestone|--- |10.5 Ever confirmed|0 |1 Known to work| |5.1.0, 5.5.0 Known to fail| |10.1.0, 6.1.0, 7.1.0 Status|UNCONFIRMED |NEW Keywords| |ice-on-valid-code Last reconfirmed| |2023-06-17 --- Comment #2 from Andrew Pinski --- Reduced testcase: ``` template struct QCachedT { void operator delete(void *, T *) {} }; template void exercise() { struct thing_t : QCachedT { }; thing_t *list[1]; new thing_t; } int main() { exercise<1>(); } ``` Note exercise needs to be templated and so does QCachedT. My guess is thing_t that is for the operator delete is not be subsituted correctly for the new class when instantiating exercise; it works ok withou= t -g but when trying to emit debug info, it crashes not knowing the class.=