https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119614
--- Comment #37 from Jan Hubicka <hubicka at gcc dot gnu.org> --- Created attachment 61128 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=61128&action=edit updated patch (regtests and bootstraps) Updated patch. Streaming summaries seems to work and fixes the testcase. I believe one can still reproduce the original problem by calling comdat function and arranging -O0 -flto body to prevail -O2 one. In this case while merging summaries we should previal "no info". It is bit exotic though, however conceptually it is wrong that we rely on optimization metadata for correctness.