analyzer: fix ICE on dtor [PR97489]
authorDavid Malcolm <dmalcolm@redhat.com>
Thu, 22 Oct 2020 10:12:31 +0000 (06:12 -0400)
committerDavid Malcolm <dmalcolm@redhat.com>
Thu, 22 Oct 2020 10:12:31 +0000 (06:12 -0400)
commitb7f2cfbf0fc7bcd5c1e60fca354de8bf60f9acfa
tree13d40d31c63354cf23256981da8f5631408030c9
parent56ddd5e23af0906573e7d50348beb42d3dae82a9
analyzer: fix ICE on dtor [PR97489]

gcc/analyzer/ChangeLog:
PR analyzer/97489
* engine.cc (exploded_graph::add_function_entry): Assert that we
have a function body.
(exploded_graph::on_escaped_function): Reject fndecls that don't
have a function body.

gcc/testsuite/ChangeLog:
PR analyzer/97489
* g++.dg/analyzer/pr97489.C: New test.
gcc/analyzer/engine.cc
gcc/testsuite/g++.dg/analyzer/pr97489.C [new file with mode: 0644]