https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113396
--- Comment #17 from David Binderman <dcb314 at hotmail dot com> --- I tried out gcc-13.2 and got the following results: foundBugs $ ~/gcc/results.13.2.asan.ubsan/bin/gcc -w -O2 --param=max-inline-insns-auto=23 bug998.c && valgrind -q ./a.out checksum = 77A231E6 foundBugs $ ~/gcc/results.13.2.asan.ubsan/bin/gcc -w -O2 --param=max-inline-insns-auto=24 bug998.c && valgrind -q ./a.out checksum = 130B5204 foundBugs $ so it is something that has been going wrong since before gcc-13.2.