https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98341
--- Comment #3 from Marius Hillenbrand <mhillen at linux dot ibm.com> --- Potential duplicate: I have seen very similar errors on s390x while reproducing https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98228 There, bisecting lead back to d119f34c952f ("New modref/ipa_modref optimization passes"). In my tests, the first stage that is compiled with -flto then later fails with errors of that kind (e.g., stage3 with config bootstrap-lto-lean). .../gcc/build-ada3/./prev-gcc/xgcc -B/.../gcc/build-ada3/./prev-gcc/ -fchecking=1 -c -g -O2 -fchecking=1 -flto=jobserver -frandom-seed=1 -gnatpg -gnata -W -Wall -nostdinc -I- -I. -Iada/generated -Iada -Iada/gcc-interface -I.. /../gcc/ada -I../../gcc/ada/gcc-interface -Iada/libgnat -I../../gcc/ada/libgnat ../../gcc/ada/libgnat/a-elchha.adb -o ada/libgnat/a-elchha.o +===========================GNAT BUG DETECTED==============================+ | 11.0.0 20201218 (experimental) (s390x-linux-gnu) Storage_Error stack overflow or erroneous memory access| | Error detected at a-elchha.adb:144:20 | | Please submit a bug report; see https://gcc.gnu.org/bugs/ . | | Use a subject line meaningful to you and us to track the bug. | | Include the entire contents of this bug box in the report. | | Include the exact command that you entered. | | Also include sources listed below. | +==========================================================================+ Please include these source files with error report Note that list may not be accurate in some cases, so please double check that the problem can still be reproduced with the set of files listed. Consider also -gnatd.n switch (see debug.adb). ../../gcc/ada/gcc-interface/system.ads ../../gcc/ada/libgnat/a-elchha.adb ../../gcc/ada/libgnat/a-elchha.ads ../../gcc/ada/libgnat/a-except.ads ../../gcc/ada/libgnat/ada.ads ../../gcc/ada/libgnat/s-parame.ads ../../gcc/ada/libgnat/s-stalib.ads ../../gcc/ada/libgnat/a-unccon.ads ../../gcc/ada/libgnat/s-traent.ads ../../gcc/ada/libgnat/s-soflin.ads ../../gcc/ada/libgnat/s-secsta.ads ../../gcc/ada/libgnat/s-stoele.ads ../../gcc/ada/libgnat/s-stache.ads and .../gcc/build-ada3/./prev-gcc/xgcc -B/.../gcc/build-ada3/./prev-gcc/ -fchecking=1 -c -g -O2 -fchecking=1 -flto=jobserver -frandom-seed=1 -gnatpg -gnata -W -Wall -g -O1 -fno-inline \ -nostdinc -I- -I. -Iada/generated -Iada -Iada/gcc-interface -I../../gcc/ada -I../../gcc/ada/gcc-interface -Iada/libgnat -I../ ../gcc/ada/libgnat ../../gcc/ada/libgnat/a-except.adb -o ada/libgnat/a-except.o +===========================GNAT BUG DETECTED==============================+ | 11.0.0 20201218 (experimental) (s390x-linux-gnu) Storage_Error stack overflow or erroneous memory access| | Error detected at a-exexda.adb:472:23 | | Please submit a bug report; see https://gcc.gnu.org/bugs/ . | | Use a subject line meaningful to you and us to track the bug. | | Include the entire contents of this bug box in the report. | | Include the exact command that you entered. | | Also include sources listed below. | +==========================================================================+ Please include these source files with error report Note that list may not be accurate in some cases, so please double check that the problem can still be reproduced with the set of files listed. Consider also -gnatd.n switch (see debug.adb). ../../gcc/ada/gcc-interface/system.ads ../../gcc/ada/libgnat/a-except.adb ../../gcc/ada/libgnat/a-except.ads ../../gcc/ada/libgnat/ada.ads ../../gcc/ada/libgnat/s-parame.ads ../../gcc/ada/libgnat/s-stalib.ads ../../gcc/ada/libgnat/a-unccon.ads ../../gcc/ada/libgnat/s-traent.ads ../../gcc/ada/libgnat/s-except.ads ../../gcc/ada/libgnat/s-excdeb.ads ../../gcc/ada/libgnat/s-soflin.ads ../../gcc/ada/libgnat/s-secsta.ads ../../gcc/ada/libgnat/s-stoele.ads ../../gcc/ada/libgnat/s-stache.ads ../../gcc/ada/libgnat/s-wchcon.ads ../../gcc/ada/libgnat/s-wchstw.ads ../../gcc/ada/libgnat/s-traceb.ads ../../gcc/ada/libgnat/s-trasym.ads ../../gcc/ada/libgnat/s-exctab.ads ../../gcc/ada/libgnat/a-excach.adb ../../gcc/ada/libgnat/a-exexda.adb