https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118786
Bug ID: 118786 Summary: more wrong code with -finline-small-functions Product: gcc Version: 15.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: dcb314 at hotmail dot com Target Milestone: --- Created attachment 60414 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=60414&action=edit C source code For recent gcc trunk: foundBugs $ rm -f ./a.out && ../results/bin/gcc -w -O2 -fno-inline-small-functions bug1087.c && ./a.out checksum = 262341BF foundBugs $ rm -f ./a.out && ../results/bin/gcc -w -O2 bug1087.c && ./a.out checksum = A2F823B2 foundBugs $ Seems ok at gcc 14.2: foundBugs $ rm -f ./a.out && ../results.14.2.0/bin/gcc -w -O2 -fno-inline-small-functions bug1087.c && ./a.out checksum = 262341BF foundBugs $ rm -f ./a.out && ../results.14.2.0/bin/gcc -w -O2 bug1087.c && ./a.out checksum = 262341BF foundBugs $ Seems bad about a month ago: foundBugs $ rm -f ./a.out && ../results.20250108.asan.ubsan/bin/gcc -w -O2 -fno-inline-small-functions bug1087.c && ./a.out checksum = 262341BF foundBugs $ rm -f ./a.out && ../results.20250108.asan.ubsan/bin/gcc -w -O2 bug1087.c && ./a.out checksum = A2F823B2 foundBugs $ I got this example from csmith.