http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57599
--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> --- The summary is very misleading. You're not casting a const type to a non-const type, you're casting a non-const type to a const type, then assigning that to a non-const type. What actually happens is that dynamic_cast<const A*>(b) returns A*