https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105978
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |INVALID Status|NEW |RESOLVED --- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> --- >-fdisable-ipa-inline This is a valid bug report. The -fdisable-* options are only for debugging and I suspect disabling the IPA inliner here is missing the free of the clone as this is what exactly the check is doing: /* Double check that all inline clones are gone and that all function bodies have been released from memory. */ Since you disable the code which will free the clones you get what you asked for.