https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118097
--- Comment #20 from David Binderman <dcb314 at hotmail dot com> --- >From the See also bug report, # 118138, I tried out -fno-inline and, for the two test cases here, the problem seemed to go away. foundBugs $ ../results/bin/gcc -O1 -w bug1071.c && ./a.out 1 > /tmp/0 foundBugs $ ../results/bin/gcc -O2 -w bug1071.c && ./a.out 1 > /tmp/1 foundBugs $ ../results/bin/gcc -O2 -fno-inline -w bug1071.c && ./a.out 1 > /tmp/2 foundBugs $ ls -l /tmp/? -rw-r--r--. 1 dcb40b dcb40b 18267 Dec 20 08:07 /tmp/0 -rw-r--r--. 1 dcb40b dcb40b 18272 Dec 20 08:07 /tmp/1 -rw-r--r--. 1 dcb40b dcb40b 18267 Dec 20 08:07 /tmp/2 foundBugs $ diff /tmp/0 /tmp/2 foundBugs $ diff /tmp/0 /tmp/1 | head -3 5,18c5,18 < ...checksum after hashing g_90 : F239C101 < ...checksum after hashing g_117 : 1EC91E0E foundBugs $ foundBugs $ ../results/bin/gcc -O1 -w bug1071B.c && ./a.out 1 > /tmp/0 foundBugs $ ../results/bin/gcc -O2 -w bug1071B.c && ./a.out 1 > /tmp/1 foundBugs $ ../results/bin/gcc -O2 -fno-inline -w bug1071B.c && ./a.out 1 > /tmp/2 foundBugs $ ls -l /tmp/? -rw-r--r--. 1 dcb40b dcb40b 44153 Dec 20 08:12 /tmp/0 -rw-r--r--. 1 dcb40b dcb40b 44156 Dec 20 08:12 /tmp/1 -rw-r--r--. 1 dcb40b dcb40b 44153 Dec 20 08:13 /tmp/2 foundBugs $ diff /tmp/0 /tmp/2 foundBugs $ diff /tmp/0 /tmp/1 | head -3 573,584c573,584 < ...checksum after hashing g_412.f4 : 4390B748 < ...checksum after hashing g_453.f0 : D80F7CF1 foundBugs $