https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92009
--- Comment #4 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Jason Merrill <ja...@gcc.gnu.org>: https://gcc.gnu.org/g:80de0002429c74626198cefa168c3081c9d90566 commit r10-5944-g80de0002429c74626198cefa168c3081c9d90566 Author: Jason Merrill <ja...@redhat.com> Date: Tue Jan 14 00:05:47 2020 -0500 PR c++/92009 - ICE with punning of typeid. There were two issues in this PR: 1) We were crashing in is_really_empty_class because we say that the internal RTTI types are classes, but never gave them TYPE_BINFO. 2) We were allowing the cast to a different pointer type because STRIP_NOPS in cxx_fold_indirect_ref ignored REINTERPRET_CAST_P. * rtti.c (get_tinfo_desc): Call xref_basetypes. * constexpr.c (cxx_fold_indirect_ref): Don't strip REINTERPRET_CAST_P.