aboutsummaryrefslogtreecommitdiff
path: root/gcc/wide-int.h
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/wide-int.h')
-rw-r--r--gcc/wide-int.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/gcc/wide-int.h b/gcc/wide-int.h
index 862079a..5e0f444f 100644
--- a/gcc/wide-int.h
+++ b/gcc/wide-int.h
@@ -852,6 +852,8 @@ inline HOST_WIDE_INT
generic_wide_int <storage>::sign_mask () const
{
unsigned int len = this->get_len ();
+ gcc_assert (len > 0);
+
unsigned HOST_WIDE_INT high = this->get_val ()[len - 1];
if (!is_sign_extended)
{