https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113255
Bug ID: 113255 Summary: wrong code with -O2 -mtune=k8 Product: gcc Version: 13.2.0 Status: UNCONFIRMED Keywords: wrong-code Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: mednafen at sent dot com Target Milestone: --- Target: x86_64-pc-linux-gnu Created attachment 57000 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=57000&action=edit test case Linux x86_64 $ /usr/local/gcc-13.2.0/bin/gcc -Wall -O2 -o sprite sprite.c && ./sprite 1 $ /usr/local/gcc-13.2.0/bin/gcc -Wall -O2 -mtune=k8 -o sprite sprite.c && ./sprite 0 Aborted The problem appears to have started around version 10.2.0.