analyzer: fix ICE on deref_rvalue on SK_COMPOUND [PR96643]
authorDavid Malcolm <dmalcolm@redhat.com>
Wed, 19 Aug 2020 17:21:47 +0000 (13:21 -0400)
committerDavid Malcolm <dmalcolm@redhat.com>
Wed, 19 Aug 2020 19:27:09 +0000 (15:27 -0400)
commit23ebfda0e352fa0a92c6b012458ecb65505a135f
treeafc50b41b174d82e50b13475da1fc913fff73626
parentfc02b568e2cd3f6a28d4b7c1063bbf8842c89aad
analyzer: fix ICE on deref_rvalue on SK_COMPOUND [PR96643]

gcc/analyzer/ChangeLog:
PR analyzer/96643
* region-model.cc (region_model::deref_rvalue): Rather than
attempting to handle all svalue kinds in the switch, only cover
the special cases, and move symbolic-region handling to after
the switch, thus implicitly handling the missing case SK_COMPOUND.

gcc/testsuite/ChangeLog:
PR analyzer/96643
* g++.dg/analyzer/pr96643.C: New test.
gcc/analyzer/region-model.cc
gcc/testsuite/g++.dg/analyzer/pr96643.C [new file with mode: 0644]