https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109184
Bug ID: 109184 Summary: csmith: really old bug with -O3 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 54701 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=54701&action=edit C source code For the attached C code, compiled with -O2 and -O3, produces different answers: $ ~/gcc/results/bin/gcc -w -O2 -fno-strict-aliasing bug897.c $ ./a.out 1 > 1 $ $ ~/gcc/results/bin/gcc -w -O3 -fno-strict-aliasing bug897.c $ ./a.out 1 > 2 $ diff 1 2 | head 2038c2038 < ...checksum after hashing g_1731[i][j] : 351CD463 --- > ...checksum after hashing g_1731[i][j] : 7739D31E 2040c2040 < ...checksum after hashing g_1731[i][j] : 791FAA71 --- > ...checksum after hashing g_1731[i][j] : FEBF8F12 The bug seems to exist since sometime before 20220403, nearly a year ago. Flag -ftrivial-auto-var-init=zero doesn't seem to help.