https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65276
--- Comment #4 from Aldy Hernandez <aldyh at gcc dot gnu.org> --- (In reply to Jan Hubicka from comment #3) > I guess it is the case where one type come from -O0 unit and have no > TYPE_BINFO, because it is not optimized. I think just removing the check may > work these days - I changed the way leading candidate is chosen and it > should be one with BINFO after all. Correct, TYPE_BINFO(type2) is NULL. Started with: commit 87a9c1b6624ae11321799e7c9aba4a7b47567d5d Author: hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> Date: Mon Feb 9 20:34:18 2015 +0000 * ipa-devirt.c (odr_types_equivalent_p): Fix formating. (add_type_duplicate): Fix comparison of BINFOs. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@220546 138bc75d-0d04-0410-96 1f-82ee72b054a4 I can post a patch.