https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103652
--- Comment #2 from hubicka at kam dot mff.cuni.cz --- > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103652 > > --- Comment #1 from Martin Liška <marxin at gcc dot gnu.org> --- > (In reply to Jan Hubicka from comment #0) > > Building clang in the funny way (training with -O2 -flto -fprofile-generate) > > and use with -O3 -flto -fprofile-generate I get ICE here: > > Do you mean, -O3 -flto -fprofile-use, right? > > I would have expected some -Werror=coverage-mismatch errors. Can you please > create a smaller reproducer where you see the error? You need to disable those to build multithreaded programs like clang. I think you can produce testcase easily by making a function with one indirect call for train run and many indirect calls in profile-use run. I have patch to avoid the buffer overflow - can send it after getting to office.