https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65263
--- Comment #3 from Jan Hubicka <hubicka at gcc dot gnu.org> --- Semantic equality hit:bool VirtualMatrice<R>::m_fn1(int) const [with R = int]->virtual bool C<int>::m_fn1(int) const Assembler symbol names:_ZNK14VirtualMatriceIiE5m_fn1Ei->_ZNK1CIiE5m_fn1Ei Wrapper cannot be created because of COMDAT 1 local calls have been redirected. Unified; Function body was removed. I assume the problem is that thunk can not be generated to non-local symbol. I specifically prevent comdat local symbols to be produced because these makes inlining harder. There are couple options. First would be to punt redirection on thunks calls, second would be to produce local alias for thunk calls. I.e. check TARGET_USE_LOCAL_THUNK_ALIAS_P and produce the local alias specifically for thunks. Third would be to produce the local alias always. I guess first is safest - while I plan to turn thunks to use noninterposable alias path, I did not because I fear undocumented target issues. Bettter to not start with these in stage4. I will prepare patch after dinner