From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id D3F8F386D606; Tue, 28 May 2024 22:17:28 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D3F8F386D606 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1716934648; bh=F9dPyWaA2d8Ji9Ek6W4wklMkuLjFJqWO9NIGEdMNJZI=; h=From:To:Subject:Date:In-Reply-To:References:From; b=tcYLsMYiVXnw165qqUgEzaMkCNJt4fqRh/yBT8I/efzQbYbOVcg9JoA7E50JJ6KS3 UxHZz+/4XDh5Ha+1EIEDu9FPs3ToZqnH0WMQjUqW+huo8hlRN4pwT5CCzru4L7c/9F 2y8beadcOR9RisBiqZHsmdffoddkYPVsVON0MMcs= From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/114245] Defaulted virtual destructors that do no work overwrite the vtable with `-O0` Date: Tue, 28 May 2024 22:17:28 +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: 13.2.0 X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: normal X-Bugzilla-Who: pinskia at gcc dot gnu.org X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: WONTFIX 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: see_also resolution bug_status 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=3D114245 Andrew Pinski changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://gcc.gnu.org/bugzill | |a/show_bug.cgi?id=3D115050 Resolution|--- |WONTFIX Status|UNCONFIRMED |RESOLVED --- Comment #6 from Andrew Pinski --- So I just debugged a bug report where the vtable storing in the deconstruct= or found the bug in their code (PR 115050). It just happens with that store, it causes a seg fault at runtime. Without the store the code seemly worked but only on accident and I had to show that a deconstructor was called twice. Having this store is definitely helpful for debugging code at -O0 and catch= ing undefined code early on. So closing as won't fix. removing the vtable store is an optimization rather than needed for correctness and having the vtable store there is very very useful for debugabity of programs.=