aboutsummaryrefslogtreecommitdiff
path: root/gcc/analyzer
diff options
context:
space:
mode:
authorDavid Malcolm <dmalcolm@redhat.com>2020-08-17 11:40:44 -0400
committerDavid Malcolm <dmalcolm@redhat.com>2020-08-17 14:46:10 -0400
commit42c5ae5d7f0ad89b75d93c497fe44b6c66da7e76 (patch)
tree54dbaf041698aac376c82baa053629b21ec835a7 /gcc/analyzer
parent35c5f8fb432c8e68af68ab48c8d3107e7839775e (diff)
downloadgcc-42c5ae5d7f0ad89b75d93c497fe44b6c66da7e76.zip
gcc-42c5ae5d7f0ad89b75d93c497fe44b6c66da7e76.tar.gz
gcc-42c5ae5d7f0ad89b75d93c497fe44b6c66da7e76.tar.bz2
analyzer: fix ICE due to NULL type [PR96639]
gcc/analyzer/ChangeLog: PR analyzer/96639 * region.cc (region::get_subregions_for_binding): Check for "type" being NULL. gcc/testsuite/ChangeLog: PR analyzer/96639 * gcc.dg/analyzer/pr96639.c: New test.
Diffstat (limited to 'gcc/analyzer')
-rw-r--r--gcc/analyzer/region.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/analyzer/region.cc b/gcc/analyzer/region.cc
index afe416b..eab1f27 100644
--- a/gcc/analyzer/region.cc
+++ b/gcc/analyzer/region.cc
@@ -256,7 +256,7 @@ region::get_subregions_for_binding (region_model_manager *mgr,
tree type,
auto_vec <const region *> *out) const
{
- if (get_type () == NULL_TREE)
+ if (get_type () == NULL_TREE || type == NULL_TREE)
return;
if (relative_bit_offset == 0
&& types_compatible_p (get_type (), type))