https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66229
--- Comment #2 from Andi Kleen <andi-gcc at firstfloor dot org> --- Some analysis of the problem: At the time cc1 is streaming out profile_data it is not set to anything in autofdo. So the LTO files contain all 0 profile data, which later causes the ICE here. Seems to be some kind of ordering problem. Strangely the autofdo pass gets executed in the frontend run, but for unknown reasons the profile data doesn't survive until the LTO data is written.