https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69133
--- Comment #8 from Jan Hubicka <hubicka at gcc dot gnu.org> --- Well, -flto-partition=none does bot IPA optimization and codegen in one run. In this case the body was once read by ipa-cp to duplicate the thunk and second time by expand_thunk. With other methods the streaming happened in between that hides the problem.