aboutsummaryrefslogtreecommitdiff
path: root/gcc/analyzer/region.cc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/analyzer/region.cc')
-rw-r--r--gcc/analyzer/region.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/analyzer/region.cc b/gcc/analyzer/region.cc
index eab1f2771cf..770e2cb849e 100644
--- a/gcc/analyzer/region.cc
+++ b/gcc/analyzer/region.cc
@@ -226,7 +226,8 @@ static tree
get_field_at_bit_offset (tree record_type, bit_offset_t bit_offset)
{
gcc_assert (TREE_CODE (record_type) == RECORD_TYPE);
- gcc_assert (bit_offset >= 0);
+ if (bit_offset < 0)
+ return NULL;
/* Find the first field that has an offset > BIT_OFFSET,
then return the one preceding it.