https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111165
--- Comment #22 from Sam James <sjames at gcc dot gnu.org> --- In general, to help reduce miscompilations, there's a few options: * Bisecting GCC (which then also allows comparing object files before/after the relevant commit) * Comparing dumps with/without that commit (which dumps are needed depends on what the commit ends up being, e.g. if it's IPA, it'd be '-da -fdump-ipa-all -fdump-unnumbered -fdump-noaddr') * Bisecting object files (have a directory of good and bad objects and copy bad->good until it breaks, minimise said list) * Bisecting the resultant bad file with pragmas to see what the minimal region needing optimize("O0") is Usually, having done that, it becomes far easier to then try extract whatever function into a standalone file. But this is pretty much what Uros and H.J said at https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111165#c14 & after.