Annex F (informative) Core undefined behavior [ub]

F.3 [expr]: Expressions [ub.expr]

F.3.24[ub:expr.delete.dynamic.type.differ]
Specified in: [expr.delete]

If the static type of the object to be deleted is different from its dynamic type and the selected deallocation function is not a destroying operator delete, the static type shall be a base class of the dynamic type of the object to be deleted and the static type shall have a virtual destructor or the behavior is undefined.
[Example 1: struct B { int a; }; struct D : public B { int b; }; void f() { B* b = new D; delete b; // undefined behavior, no virtual destructor } — end example]