aboutsummaryrefslogtreecommitdiff
path: root/gcc/gimple-range-cache.cc
diff options
context:
space:
mode:
authorTim Lange <mail@tim-lange.me>2022-07-22 21:44:07 +0200
committerTim Lange <mail@tim-lange.me>2022-07-22 21:46:51 +0200
commitb4cc945c045db74f719ab030969806c14e2d5fc3 (patch)
treee3e3c81f6a94941371c5fa06aedf1e827e9d33fe /gcc/gimple-range-cache.cc
parent64cb87b2381aceaa37230bae7f43c7b9f978d3e3 (diff)
downloadgcc-b4cc945c045db74f719ab030969806c14e2d5fc3.zip
gcc-b4cc945c045db74f719ab030969806c14e2d5fc3.tar.gz
gcc-b4cc945c045db74f719ab030969806c14e2d5fc3.tar.bz2
Fix handling of zero capacity regions in -Wanalyzer-allocation-size [PR106394]
This patch unifies the handling of zero capacity regions for structs and other types in the allocation size checker. Regression-tested on x86_64 Linux. 2022-07-22 Tim Lange <mail@tim-lange.me> gcc/analyzer/ChangeLog: PR analyzer/106394 * region-model.cc (capacity_compatible_with_type): Always return true if alloc_size is zero. gcc/testsuite/ChangeLog: PR analyzer/106394 * gcc.dg/analyzer/pr106394.c: New test.
Diffstat (limited to 'gcc/gimple-range-cache.cc')
0 files changed, 0 insertions, 0 deletions