diff options
author | David Malcolm <dmalcolm@redhat.com> | 2020-08-17 11:40:44 -0400 |
---|---|---|
committer | David Malcolm <dmalcolm@redhat.com> | 2020-08-17 14:46:10 -0400 |
commit | 42c5ae5d7f0ad89b75d93c497fe44b6c66da7e76 (patch) | |
tree | 54dbaf041698aac376c82baa053629b21ec835a7 /gcc/analyzer | |
parent | 35c5f8fb432c8e68af68ab48c8d3107e7839775e (diff) | |
download | gcc-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.cc | 2 |
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)) |