https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121687
Bug ID: 121687 Summary: Another early August wrong code bug Product: gcc Version: 16.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 62211 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=62211&action=edit C source code The attached code does this with gcc trunk: foundBugs $ /home/dcb42/gcc/results.20250804.asan.ubsan/bin/gcc -w -O2 -Werror=return-type -Werror=uninitialized -Werror=overflow -Werror=sequence-point bug1117.c && valgrind -q ./a.out checksum = B0C5658A foundBugs $ /home/dcb42/gcc/results.20250806.asan.ubsan/bin/gcc -w -O2 -Werror=return-type -Werror=uninitialized -Werror=overflow -Werror=sequence-point bug1117.c && valgrind -q ./a.out checksum = 693B9C6B foundBugs $ So something has gone wrong between those two compilers. foundBugs $ /home/dcb42/gcc/results.20250804.asan.ubsan/bin/gcc -v 2>&1 | grep exp gcc version 16.0.0 20250804 (experimental) (b963237a903f73cf) foundBugs $ /home/dcb42/gcc/results.20250806.asan.ubsan/bin/gcc -v 2>&1 | grep exp gcc version 16.0.0 20250806 (experimental) (87262627fd65a1a7) foundBugs $ There are 259 commits between those two points. Interestingly: foundBugs $ /home/dcb42/gcc/results.20250806.asan.ubsan/bin/gcc -w -O1 -Werror=return-type -Werror=uninitialized -Werror=overflow -Werror=sequence-point bug1117.c && valgrind -q ./a.out checksum = B0C5658A foundBugs I will have a go at a reduction.