https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110714
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Ever confirmed|0 |1 Last reconfirmed| |2023-07-18 --- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> --- Note this works on the trunk: ``` struct Base { constexpr virtual ~Base() {} // constexpr Base* get_this() { return this; } int x; }; struct Derived : public Base {}; constexpr bool test() { Derived* pf = new Derived; Base* t = pf; delete t; return true; } constexpr bool b = test(); ```