https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111393
--- Comment #6 from Andrew Pinski <pinskia at gcc dot gnu.org> --- (In reply to AK from comment #5) > Created attachment 55890 [details] > GlobalModuleIndex.cpp preprocessed files > > Everytime the crash is in a different file. it could be just because of > memory issues. this does seem like a HW issue. Are you sure you have a decent RISCV machine without any memory issues? I suspect ninja is building with all of the cores which pushes the memory usage high. Maybe lower the clock speed of the CPU you are using. Try with a cross compile also.