[Bug middle-end/109031] csmith: possible bad code with -O2 -fno-strict-aliasing since r13-254-gdd3c7873a61019e9
dcb314 at hotmail dot com
gcc-bugzilla@gcc.gnu.org
Thu Mar 9 09:45:46 GMT 2023
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109031
--- Comment #24 from David Binderman <dcb314 at hotmail dot com> ---
I tried experimenting with the flags that change -O1 into -O2 and got this:
$ for i in ~/gcc/results.202205*/bin/gcc; do echo $i; $i -w
-ftrivial-auto-var-init=zero -O1 -fno-strict-aliasing bug892.c && (./a.out 1 |
fgrep g_50); done
/home/dcb36/gcc/results.20220501/bin/gcc
...checksum after hashing g_50 : 646CF84D
/home/dcb36/gcc/results.20220508/bin/gcc
...checksum after hashing g_50 : 646CF84D
/home/dcb36/gcc/results.20220515/bin/gcc
...checksum after hashing g_50 : 646CF84D
$ for i in ~/gcc/results.202205*/bin/gcc; do echo $i; $i -w
-ftrivial-auto-var-init=zero -O1 -fcode-hoisting -fno-strict-aliasing bug892.c
&& (./a.out 1 | fgrep g_50); done
/home/dcb36/gcc/results.20220501/bin/gcc
...checksum after hashing g_50 : 646CF84D
/home/dcb36/gcc/results.20220508/bin/gcc
...checksum after hashing g_50 : 646CF84D
/home/dcb36/gcc/results.20220515/bin/gcc
...checksum after hashing g_50 : C21BF3F9
so the -fcode-hoisting looks to be part of the problem.
More information about the Gcc-bugs
mailing list