diff options
author | David Malcolm <dmalcolm@redhat.com> | 2024-02-15 16:01:36 -0500 |
---|---|---|
committer | David Malcolm <dmalcolm@redhat.com> | 2024-02-15 16:01:36 -0500 |
commit | 617bd59c659dcf6e5391409a2e9f64f75e905a96 (patch) | |
tree | 48f6d8d643e67c17e6d753f27151ecb4be8a5bc5 /libgomp | |
parent | 0d5d1c75f5c68b6064640c3154ae5f4c0b464905 (diff) | |
download | gcc-617bd59c659dcf6e5391409a2e9f64f75e905a96.zip gcc-617bd59c659dcf6e5391409a2e9f64f75e905a96.tar.gz gcc-617bd59c659dcf6e5391409a2e9f64f75e905a96.tar.bz2 |
analyzer: remove offset_region size overloads [PR111266]
PR analyzer/111266 reports a missing -Wanalyzer-out-of-bounds when
accessing relative to a concrete byte offset.
Root cause is that offset_region::get_{byte,bit}_size_sval were
attempting to compute the size that's valid to access, rather than the
size of the access attempt.
Fixed by removing these vfunc overrides from offset_region as the
base class implementation does the right thing.
gcc/analyzer/ChangeLog:
PR analyzer/111266
* region.cc (offset_region::get_byte_size_sval): Delete.
(offset_region::get_bit_size_sval): Delete.
* region.h (region::get_byte_size): Add comment clarifying that
this relates to the size of the access, rather than the size
that's valid to access.
(region::get_bit_size): Likewise.
(region::get_byte_size_sval): Likewise.
(region::get_bit_size_sval): Likewise.
(offset_region::get_byte_size_sval): Delete.
(offset_region::get_bit_size_sval): Delete.
gcc/testsuite/ChangeLog:
PR analyzer/111266
* c-c++-common/analyzer/out-of-bounds-pr111266.c: New test.
Signed-off-by: David Malcolm <dmalcolm@redhat.com>
Diffstat (limited to 'libgomp')
0 files changed, 0 insertions, 0 deletions