There is no reason to expect this to work, and no reason to expect it not to work.
You're calling a function on an object that doesn't exist, through an uninitialised and invalid pointer.
Anything can happen.
Anything.
In practice you're not going to see great virtual dispatch results since these rely on data stored within the object that doesn't exist, whereas a normal function call is simpler and can "just happen" without needing to really dereference the pointer.
But that's besides the point really, because compilers are complicated and all intended meaning (whatever that is, in a program with undefined behaviour!) can easily be lost from your code in the process of translation and optimisation.
A language that cares a little less about "pay for what I don't use" could make this a hard error, but that's not how C++ works.