https://gcc.gnu.org/bugzilla/show_bug.cgi?id=122824
Bug ID: 122824
Summary: Array out-of-bounds warning when building with
optimization greater than -O1
Product: gcc
Version: 16.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: d7d1cd at mail dot ru
Target Milestone: ---
The issue was resolved in this report
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=122625 . However, if the original
example from this report is compiled with optimizations greater than -01, the
compiler will issue a warning about an array out-of-bounds error.
Reproduction here https://godbolt.org/z/3fsxc1Tx1