https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69239
Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |hubicka at gcc dot gnu.org, | |jason at gcc dot gnu.org Component|middle-end |ipa --- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> --- -fno-devirtualize fixes it. Seems the obj->foo call in middleman is devirtualized to _ZThn16_N1B3fooEi, although middleend can (and is) called from A constructor and therefore it really should call _ZN1A3fooEi in that case.