summaryrefslogtreecommitdiff
path: root/gcc/cp/call.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/cp/call.c')
-rw-r--r--gcc/cp/call.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/cp/call.c b/gcc/cp/call.c
index 56346063f3d..8f56cf17cbc 100644
--- a/gcc/cp/call.c
+++ b/gcc/cp/call.c
@@ -38,6 +38,7 @@ along with GCC; see the file COPYING3. If not see
#include "c-family/c-objc.h"
#include "timevar.h"
#include "cgraph.h"
+#include "wide-int.h"
/* The various kinds of conversion. */
@@ -941,7 +942,7 @@ build_array_conv (tree type, tree ctor, int flags, tsubst_flags_t complain)
if (TYPE_DOMAIN (type))
{
- unsigned HOST_WIDE_INT alen = tree_low_cst (array_type_nelts_top (type), 1);
+ unsigned HOST_WIDE_INT alen = tree_to_uhwi (array_type_nelts_top (type));
if (alen < len)
return NULL;
}