Annex F (informative) Core undefined behavior [ub]

F.2 [basic]: Basics [ub.basic]

F.2.7[ub:lifetime.outside.pointer.dynamic.cast]
Specified in: [basic.life]

For a pointer pointing to an object outside of its lifetime, behavior is undefined if the pointer is used as the operand of a dynamic_cast ([expr.dynamic.cast]).
[Example 1: struct B { virtual ~B() = default; }; struct D : B {}; void f() { D d; B* bp = &d; d.~D(); D* dp = dynamic_cast<D*>(bp); // undefined behavior } — end example]