https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78038
--- Comment #5 from ktkachov at gcc dot gnu.org --- (In reply to Steffen Schmidt from comment #0) > Created attachment 39840 [details] > Test source file > > Dear GCC maintainers, > > we found that gcc / g++ crashes with internal compiler error in get_sub_rtx, > at ree.c:655 at optimization level -O2 > Target plattform is aarch64-elf, in detail -march=armv8-a -mabi=ilp32 > > It seems the the order of the statements, especially the call to a function > pointer and use of global register variable is important. Unfortunately I > could not determine a dedicated optimization option causing the problem. > By the way, the optimisation in which the ICE occurs is ree (redundant extension elimination). You can turn it off by adding -fno-ree to the flags.