https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88337
--- Comment #7 from Marek Polacek <mpolacek at gcc dot gnu.org> --- Sidecast now works too: struct A { virtual void afn () {} }; struct B { virtual void bfn () {} }; struct D : A, B { }; constexpr bool fn () { bool ok = true; D d; A *a = &d; if (B *bp = dynamic_cast<B*>(a)) /*OK*/; else ok = false; A &ar = d; B &br = dynamic_cast<B&>(ar); return ok; } static_assert(fn ());