https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106943
Bug ID: 106943 Summary: GCC building clang/llvm with LTO flags causes ICE in clang Product: gcc Version: 12.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: immoloism at googlemail dot com Target Milestone: --- Created attachment 53574 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=53574&action=edit ICE error I've found an interesting ICE which only occurs when LTO flags are turned on in GCC while building clang and llvm while compiling compiler-rt-sanitizers. If I rebuild clang/llvm without the flto cflags then the bug does not appear. CFLAGS used to build clang/llvm "-march=native -O2 -pipe -fgraphite-identity -floop-nest-optimize -flto=8 -fuse-linker-plugin -falign-functions=32" This is the first time I've run into anything like this so please ask if any other files or tests will help you identify the cause and I'd be happy to oblige. I have reported this to the LLVM team and they believe this could be an issue your end so hopefully you have some ideas to add.