analyzer: fix ICE handling void-type (PR 93373)
authorDavid Malcolm <dmalcolm@redhat.com>
Wed, 22 Jan 2020 18:08:26 +0000 (13:08 -0500)
committerDavid Malcolm <dmalcolm@redhat.com>
Fri, 31 Jan 2020 22:24:42 +0000 (17:24 -0500)
commit09bea5845a50189b093e7fa8d5b840da702197d4
tree5e817797f3851e12dda366f127f2884d57473964
parent2a07345c4f8dabc286fc470e76c53473e5bc3eb7
analyzer: fix ICE handling void-type (PR 93373)

gcc/analyzer/ChangeLog:
PR analyzer/93373
* region-model.cc (ASSERT_COMPAT_TYPES): Convert to...
(assert_compat_types): ...this, and bail when either type is NULL,
or when VOID_TYPE_P (dst_type).
(region_model::get_lvalue): Update for above conversion.
(region_model::get_rvalue): Likewise.

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