https://gcc.gnu.org/bugzilla/show_bug.cgi?id=124358
Bug ID: 124358
Summary: [tree-optimization] Generating an incorrect
intermediate language tree for C/C++
Product: gcc
Version: 16.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: tree-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: zheng.xianyuwang at gmail dot com
Target Milestone: ---
Created attachment 63827
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=63827&action=edit
example file
Following this commit
https://gcc.gnu.org/cgit/gcc/commit/?id=51d464b608b38b9e2007948d10b1e0f1dcec142c
using -O2 or -O3 (with --ftree-dse enabled) removes potentially erroneous data
from the tree-dse generated intermediate language tree that contains a single
step involving "pointer arithmetic and multiple dereferences".
Affects every version since gcc-11.3.0.
Compile using the parameters
`gcc -fdump-tree-original -O2 --assemble test3.c func.c`.