analyzer: fix false leaks when writing through unknown ptrs [PR97072]
authorDavid Malcolm <dmalcolm@redhat.com>
Wed, 6 Jan 2021 01:54:50 +0000 (20:54 -0500)
committerDavid Malcolm <dmalcolm@redhat.com>
Wed, 6 Jan 2021 01:54:50 +0000 (20:54 -0500)
commitac3966e315ada63eb379d560a012fa77c3909155
tree0a12bca0d543f8bcd8b12e8ea831ba644af08f9a
parent23fc2be633c61f24a4fbd4096c669e7147ca44ae
analyzer: fix false leaks when writing through unknown ptrs [PR97072]

gcc/analyzer/ChangeLog:
PR analyzer/97072
* region-model-reachability.cc (reachable_regions::init_cluster):
Convert symbolic region handling to a switch statement.  Add cases
to handle SK_UNKNOWN and SK_CONJURED.

gcc/testsuite/ChangeLog:
PR analyzer/97072
* gcc.dg/analyzer/pr97072.c: New test.
gcc/analyzer/region-model-reachability.cc
gcc/testsuite/gcc.dg/analyzer/pr97072.c [new file with mode: 0644]