https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91375
--- Comment #3 from Martin Liška <marxin at gcc dot gnu.org> --- > > so I guess that flag_devirtualize is to blame since it may differ between > CUs and type merging may chose the instance from a !flag_devirtualize one. > A fix could be as simple as removing the !flag_devirtualize case. Yes, the removal of '!flag_devirtualize' looks logical to me.