]> git.ipfire.org Git - thirdparty/gcc.git/commit
analyzer: fix -Wanalyzer-allocation-size false +ve on Linux kernel's round_up macro...
authorDavid Malcolm <dmalcolm@redhat.com>
Tue, 30 Jan 2024 13:17:47 +0000 (08:17 -0500)
committerDavid Malcolm <dmalcolm@redhat.com>
Tue, 30 Jan 2024 13:17:47 +0000 (08:17 -0500)
commit9f382376660069e49290fdb51861abdec63519c7
tree8155436542d5b19bd871e5e7e63d5868661e349f
parent181f753dc4afa9866d6125904cf050d5eb437a86
analyzer: fix -Wanalyzer-allocation-size false +ve on Linux kernel's round_up macro [PR113654]

gcc/analyzer/ChangeLog:
PR analyzer/113654
* region-model.cc (is_round_up): New.
(is_multiple_p): New.
(is_dubious_capacity): New.
(region_model::check_region_size): Move usage of size_visitor into
is_dubious_capacity.

gcc/testsuite/ChangeLog:
PR analyzer/113654
* c-c++-common/analyzer/allocation-size-pr113654-1.c: New test.

Signed-off-by: David Malcolm <dmalcolm@redhat.com>
gcc/analyzer/region-model.cc
gcc/testsuite/c-c++-common/analyzer/allocation-size-pr113654-1.c [new file with mode: 0644]