https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107566
David Malcolm <dmalcolm at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |ASSIGNED Last reconfirmed| |2022-11-08 Ever confirmed|0 |1 --- Comment #4 from David Malcolm <dmalcolm at gcc dot gnu.org> --- (In reply to Jamie Bainbridge from comment #2) [...snip...] > Is "-Waggressive-loop-optimizations" the correct thing to trip here? > > I would have expected "-Wanalyzer-out-of-bounds". > > If you're happy that is working correctly, this is good to close as > WORKSFORME or whatever you feel is appropriate. Please keep this open; the analyzer ought to be able to detect such cases, without optimization needing to be on.