https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108770
--- Comment #11 from Andrew Teylu <andrew.teylu at vector dot com> --- (In reply to Andrew Pinski from comment #10) > Ok, with const maybe the compiler could see that but then it needs to record > that somehow but there is no way currently. > Sure, and, to me, it isn't a problem that it isn't currently fixable/resolvable, I just didn't think it was correct to close this case as "FIXED" when actually it isn't. In fact, you could argue that, when you turn on `diagnostics-show-context`, gcc is a "worse" because it "doubling down" on a false positive ... Is it obvious to anyone what changed between 11.x and 12.1 to make this appear?