https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118097
Bug ID: 118097 Summary: recent bug with -O2, but not -O1 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 59901 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=59901&action=edit C source code For the attached C code, from csmith: foundBugs $ /home/dcb40b/gcc/results.20241215.asan.ubsan/bin/gcc -w -O2 -Werror=uninitialized -Werror=aggressive-loop-optimizations -Werror=sequence-point bug1071.c && ./a.out 1 | grep "g_90 :" ...checksum after hashing g_90 : F239C101 foundBugs $ /home/dcb40b/gcc/results.20241217.asan.ubsan/bin/gcc -w -O2 -Werror=uninitialized -Werror=aggressive-loop-optimizations -Werror=sequence-point bug1071.c && ./a.out 1 | grep "g_90 :" ...checksum after hashing g_90 : B01CC67C foundBugs $ /home/dcb40b/gcc/results.20241215.asan.ubsan/bin/gcc -w -O1 -Werror=uninitialized -Werror=aggressive-loop-optimizations -Werror=sequence-point bug1071.c && ./a.out 1 | grep "g_90 :" ...checksum after hashing g_90 : F239C101 foundBugs $ /home/dcb40b/gcc/results.20241217.asan.ubsan/bin/gcc -w -O1 -Werror=uninitialized -Werror=aggressive-loop-optimizations -Werror=sequence-point bug1071.c && ./a.out 1 | grep "g_90 :" ...checksum after hashing g_90 : F239C101 So the 20241217 compiler with -O2 looks suspicious. foundBugs $ /home/dcb40b/gcc/results.20241215.asan.ubsan/bin/gcc -v 2>&1 | grep exp gcc version 15.0.0 20241215 (experimental) (fe545ea3d82bc2ba) foundBugs $ /home/dcb40b/gcc/results.20241217.asan.ubsan/bin/gcc -v 2>&1 | grep exp gcc version 15.0.0 20241217 (experimental) (40e5636e086e51f5) foundBugs $ I have a reduction running.