https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105264
--- Comment #6 from David Malcolm <dmalcolm at gcc dot gnu.org> --- There are some fiddly issues where the analyzer fails to figure out that ptr + i and &ptr[i] refer to the same memory, for certain symbolic values of i. I'm testing a partial fix for GCC 12, which at least seems to fix the -Wanalyzer-use-of-uninitialized-value false positives identified in the reproducer. That said, I think for a deeper fix it's probably best to wait until GCC 13.