https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100430
--- Comment #4 from Jens Maurer <jens.maurer at gmx dot net> --- Thanks. My take-away from the discussion is that -Warray-bounds triggers when there might be a code path with bad behavior. Whether such a code path is detected depends very much on the details of optimization behavior and is thus a bit unpredictable. Please resolve.