https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113831
Bug ID: 113831 Summary: [11/12/13/14 Regression] Wrong VN with structurally identical ref since r9-398-g6b9fc1782effc67dd9f6def16207653d79647553 Product: gcc Version: 14.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: rguenth at gcc dot gnu.org Target Milestone: --- The following is miscompiled by FRE with -O2 int a[3]; int __attribute__((noipa)) foo(int i, int x) { int tem = 0; a[2] = x; if (i < 1) ++i; else { ++i; tem = a[i]; } tem += a[i]; return tem; } int main() { if (foo (0, 7) != 0) __builtin_abort(); }