aboutsummaryrefslogtreecommitdiff
path: root/gcc/fold-const.cc
diff options
context:
space:
mode:
authorDavid Malcolm <dmalcolm@redhat.com>2024-01-25 10:06:12 -0500
committerDavid Malcolm <dmalcolm@redhat.com>2024-01-25 10:06:12 -0500
commit6426d466779fa889bca170e3ff80dbfc6ea8c2e8 (patch)
tree8485d8299a610e4982e91507701e574718f48a28 /gcc/fold-const.cc
parent4ffcceef8137b7151ad1e779e38e4b6a3bdcaea8 (diff)
downloadgcc-6426d466779fa889bca170e3ff80dbfc6ea8c2e8.zip
gcc-6426d466779fa889bca170e3ff80dbfc6ea8c2e8.tar.gz
gcc-6426d466779fa889bca170e3ff80dbfc6ea8c2e8.tar.bz2
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. 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 * c-c++-common/analyzer/compound-assignment-5.c (test_3): Remove xfails, reorder tests. * c-c++-common/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 <dmalcolm@redhat.com>
Diffstat (limited to 'gcc/fold-const.cc')
0 files changed, 0 insertions, 0 deletions