analyzer: fix ICE on NULL dereference [PR96644]
authorDavid Malcolm <dmalcolm@redhat.com>
Mon, 17 Aug 2020 16:30:56 +0000 (12:30 -0400)
committerDavid Malcolm <dmalcolm@redhat.com>
Mon, 17 Aug 2020 18:47:18 +0000 (14:47 -0400)
commitb00a83047574eb6f8d1e670ad439609125873506
tree139ebeb1d4205f02ee52980028c35c6c5fa71ca9
parent42c5ae5d7f0ad89b75d93c497fe44b6c66da7e76
analyzer: fix ICE on NULL dereference [PR96644]

gcc/analyzer/ChangeLog:
PR analyzer/96644
* region-model-manager.cc (get_region_for_unexpected_tree_code):
Handle ctxt being NULL.

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