aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-phiopt.cc
diff options
context:
space:
mode:
authorTim Lange <mail@tim-lange.me>2022-08-12 10:26:14 +0200
committerTim Lange <mail@tim-lange.me>2022-08-12 10:37:26 +0200
commit2b75b3b6a4ddc0d65a84a0cc4b00c47ae70e52c0 (patch)
tree7781fbbb7f03c5e253ef55313521fdae98dcc935 /gcc/tree-ssa-phiopt.cc
parent1595794f804ed3e925dcdf5f21b7fa762c74ca15 (diff)
downloadgcc-2b75b3b6a4ddc0d65a84a0cc4b00c47ae70e52c0.zip
gcc-2b75b3b6a4ddc0d65a84a0cc4b00c47ae70e52c0.tar.gz
gcc-2b75b3b6a4ddc0d65a84a0cc4b00c47ae70e52c0.tar.bz2
analyzer: consider that realloc could shrink the buffer [PR106539]
This patch adds the "shrinks buffer" case to the success_with_move modelling of realloc. Regression-tested on Linux x86-64, further ran the analyzer tests with the -m32 option. 2022-08-11 Tim Lange <mail@tim-lange.me> gcc/analyzer/ChangeLog: PR analyzer/106539 * region-model-impl-calls.cc (region_model::impl_call_realloc): Use the result of get_copied_size as the size for the sized_regions in realloc. (success_with_move::get_copied_size): New function. gcc/testsuite/ChangeLog: PR analyzer/106539 * gcc.dg/analyzer/pr106539.c: New test. * gcc.dg/analyzer/realloc-5.c: New test.
Diffstat (limited to 'gcc/tree-ssa-phiopt.cc')
0 files changed, 0 insertions, 0 deletions