https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85652
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> --- I suspect this is due to inlining decision of b::h into f. In PIC mode, b::h is consider overwritable so it is not inclined while in non pic mode it is inlined.