public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/102167] New: Constexpr virtual destructors confuse memory leak detection during constant evaluation
@ 2021-09-01 22:37 friedkeenan at protonmail dot com
2021-09-01 22:43 ` [Bug c++/102167] " pinskia at gcc dot gnu.org
0 siblings, 1 reply; 2+ messages in thread
From: friedkeenan at protonmail dot com @ 2021-09-01 22:37 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102167
Bug ID: 102167
Summary: Constexpr virtual destructors confuse memory leak
detection during constant evaluation
Product: gcc
Version: 12.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: friedkeenan at protonmail dot com
Target Milestone: ---
Minimal example:
struct S {
virtual constexpr ~S() { }
};
consteval bool test() {
const auto ptr = new S;
delete ptr;
return true;
}
static_assert(test());
Godbolt link: https://godbolt.org/z/6jszvsxGE
Clang handles the code correctly.
Possibly related to Bug 93413, which is the reason why the virtual destructor
is not defaulted, as doing so raises the error from that report.
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug c++/102167] Constexpr virtual destructors confuse memory leak detection during constant evaluation
2021-09-01 22:37 [Bug c++/102167] New: Constexpr virtual destructors confuse memory leak detection during constant evaluation friedkeenan at protonmail dot com
@ 2021-09-01 22:43 ` pinskia at gcc dot gnu.org
0 siblings, 0 replies; 2+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-09-01 22:43 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102167
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |DUPLICATE
Status|UNCONFIRMED |RESOLVED
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Dup of bug 100495.
*** This bug has been marked as a duplicate of bug 100495 ***
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-09-01 22:43 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-01 22:37 [Bug c++/102167] New: Constexpr virtual destructors confuse memory leak detection during constant evaluation friedkeenan at protonmail dot com
2021-09-01 22:43 ` [Bug c++/102167] " pinskia at gcc dot gnu.org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).