https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102649
--- Comment #3 from Martin Liška <marxin at gcc dot gnu.org> --- All right, so being in the described situation I would recommend the following steps: 1) please try bisecting GCC revisions and find the first on that fixed the issue in between version 9.x and 10.x release. That would tell us more. 2) You can experiment with -fno-lto, which you can use for a subset of object files (the rest will be built with LTO). Doing that, you will be able to isolate that to a minimal set of objects that need -flto in order to expose the issue. 3) You can use -fdump-tree-all for LTO linking step and you can investigate if the caller really calls the function with an argument being set to 0.