aboutsummaryrefslogtreecommitdiff
path: root/gcc/rtl.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/rtl.c')
-rw-r--r--gcc/rtl.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/gcc/rtl.c b/gcc/rtl.c
index 035eadc..b0ba1ff 100644
--- a/gcc/rtl.c
+++ b/gcc/rtl.c
@@ -158,10 +158,13 @@ static size_t rtvec_alloc_sizes;
Store the length, and initialize all elements to zero. */
rtvec
-rtvec_alloc (int n)
+rtvec_alloc (size_t n)
{
rtvec rt;
+ /* rtvec_def.num_elem is an int. */
+ gcc_assert (n < INT_MAX);
+
rt = ggc_alloc_rtvec_sized (n);
/* Clear out the vector. */
memset (&rt->elem[0], 0, n * sizeof (rtx));