https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70112
--- Comment #2 from Marek Behun <kabel at blackhole dot sk> --- (In reply to Markus Trippelsdorf from comment #1) Does not happen with -O0, does with -O1, -O2, -O3. When gengal.bin is compiled with -O0 -fsanitize=undefined, then in runs successfully, but the sanitizer prints some errors, attaching them in sanitizer-output.txt. With higher optimizations and -fsanitize=undefined the sanitizer prints the same, but then the program crashes. I do therefore not know if the segfault is caused by the same thing that sanitizer complains about. How can I discover if those things are related? The issue does not go away when compiled with "-fno-lifetime-dse -fno-delete-null-pointer-checks". Any ideas how to GDB it?