gcc-16 devirtualization changes

A quiz Let’s start from a quiz: is this single file program a valid c++ program? Will it always build and run? void d_impl(void); /* has no definition at all! */ struct B { virtual void f(void) {} }; struct D : public B { virtual void f(void) { d_impl(); } }; void do_f(struct B* o) { o->f(); } int main(void) { return 0; } Running gcc It feels like this whole program is just an obfuscated version…