https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112969
--- Comment #4 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-13 branch has been updated by David Malcolm <dmalc...@gcc.gnu.org>: https://gcc.gnu.org/g:0593151221ad21c2a67dfda597539c458ab731d8 commit r13-8753-g0593151221ad21c2a67dfda597539c458ab731d8 Author: David Malcolm <dmalc...@redhat.com> Date: Thu May 9 13:09:30 2024 -0400 analyzer: fix defaults in compound assignments from non-zero offsets [PR112969] Confusion in binding_cluster::maybe_get_compound_binding about whether offsets are relative to the start of the region or to the start of the cluster was leading to incorrect handling of default values, leading to false positives from -Wanalyzer-use-of-uninitialized-value, from -Wanalyzer-exposure-through-uninit-copy, and other logic errors. Fixed thusly. Backported from commit r14-8428-g6426d466779fa8 (keeping tests in gcc.dg, rather than c-c++-common). gcc/analyzer/ChangeLog: PR analyzer/112969 * store.cc (binding_cluster::maybe_get_compound_binding): When populating default_map, express the bit-range of the default key for REG relative to REG, rather than to the base region. gcc/testsuite/ChangeLog: PR analyzer/112969 * gcc.dg/analyzer/compound-assignment-5.c (test_3): Remove xfails, reorder tests. * gcc.dg/analyzer/compound-assignment-pr112969.c: New test. * gcc.dg/plugin/infoleak-pr112969.c: New test. * gcc.dg/plugin/plugin.exp: Add infoleak-pr112969.c to analyzer_kernel_plugin.c tests. Signed-off-by: David Malcolm <dmalc...@redhat.com>