https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109031
--- Comment #24 from David Binderman <dcb314 at hotmail dot com> --- I tried experimenting with the flags that change -O1 into -O2 and got this: $ for i in ~/gcc/results.202205*/bin/gcc; do echo $i; $i -w -ftrivial-auto-var-init=zero -O1 -fno-strict-aliasing bug892.c && (./a.out 1 | fgrep g_50); done /home/dcb36/gcc/results.20220501/bin/gcc ...checksum after hashing g_50 : 646CF84D /home/dcb36/gcc/results.20220508/bin/gcc ...checksum after hashing g_50 : 646CF84D /home/dcb36/gcc/results.20220515/bin/gcc ...checksum after hashing g_50 : 646CF84D $ for i in ~/gcc/results.202205*/bin/gcc; do echo $i; $i -w -ftrivial-auto-var-init=zero -O1 -fcode-hoisting -fno-strict-aliasing bug892.c && (./a.out 1 | fgrep g_50); done /home/dcb36/gcc/results.20220501/bin/gcc ...checksum after hashing g_50 : 646CF84D /home/dcb36/gcc/results.20220508/bin/gcc ...checksum after hashing g_50 : 646CF84D /home/dcb36/gcc/results.20220515/bin/gcc ...checksum after hashing g_50 : C21BF3F9 so the -fcode-hoisting looks to be part of the problem.