https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99621
--- Comment #10 from William Bader <williambader at hotmail dot com> --- The program before creduce has debug code. Setting the variable to print the debug code makes the program work. Usually for something like this, I would put in debug code and see where the good and bad versions first differ, but that doesn't work because any call to an external function (even to an empty function) makes the program work. That is why I first suspected it was related to -fcaller-saves. In MSDOS days, stdio data was often in low memory, and null pointer references would sometimes get into stdio buffers, and adding a printf would keep it from doing damage, but I do not think that is the case with this program because just calling a an empty function makes it work. Also, the program runs cleanly in valgrind, gcc -fsanitize=undefined, and bounds-checking-gcc http://williambader.com/bounds/example.html and neither gcc, gcc -fanalyzer, or clang give warnings about uninitialized variables.