https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108250
--- Comment #3 from Sam James <sam at gentoo dot org> --- Flags used to build LLVM: export FFLAGS='-O2 -mcpu=powerpc -mtune=powerpc -pipe' export CXXFLAGS='-O2 -mcpu=powerpc -mtune=powerpc -pipe -ggdb -D_GLIBCXX_ASSERTIONS=1' export LDFLAGS='-Wl,-O1 -Wl,--as-needed' export FCFLAGS='-O2 -mcpu=powerpc -mtune=powerpc -pipe' export CFLAGS='-O2 -mcpu=powerpc -mtune=powerpc -pipe -ggdb' LLVM was built at llvm-project.git commit a4e3457fb752d675c58fb14a3d8ed03fe218b6b0 for the bisect. _GLIBCXX_ASSERTIONS seemed to make the miscompilation more likely, anecdotally, but the original bug reported in Gentoo didn't have this set, and I reproduced the hang without it. But it seems more likely to happen when it's set.