https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115410
--- Comment #7 from user202729 <user202729 at protonmail dot com> --- (In reply to Andrew Pinski from comment #6) > They can be different due to the way shared libraries work. Ah, too bad. Is it safe to at least assume that the function pointers inside the virtual pointer table be equal then? The original motivation was to devirtualize the function call inside something like (though this would be a different PR) if(typeid(*x)==typeid(A)) x->f(); then would it be safe to assume `x->_vptr[0] == &A::f`?