https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69850
--- Comment #16 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Created attachment 37735 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=37735&action=edit gcc6-pr69850-3.patch Untested incremental fix for the dynamic_cast issue.