https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106762
--- Comment #3 from Matt Taylor ---
Actually one thing that I said before does not make sense. I said that the
analysis seems to allow a 1 byte write to NULL but not 2 or more. However, the
warning does not trigger if the offset of the field in
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106762
--- Comment #2 from Matt Taylor ---
Yes, the test case is immensely reduced from the original code. However, there
are still three problems. First, the warning fails to note that the array
bounds _could_ be [0,0] and implies that they are _alway
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106762
Bug ID: 106762
Summary: incorrect array bounds warning (-Warray-bounds) at -O2
on memset()
Product: gcc
Version: 11.2.0
Status: UNCONFIRMED
Severity: normal