https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108718
Bug ID: 108718 Summary: csmith: possible bad code with -O2 Product: gcc Version: 13.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 54432 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=54432&action=edit C source code The attached C code, produced by csmith, does this: $ ../results/bin/gcc -w -O1 bug883.c && ./a.out checksum = 7A94E377 $ ../results/bin/gcc -w -O2 bug883.c && ./a.out checksum = 842F1622 $ The bug seems to exist since sometime before 20220703 $ ../results.20220703/bin/gcc -w -O2 bug883.c && ./a.out checksum = 842F1622 $ I will have a go at a reduction.