aboutsummaryrefslogtreecommitdiff
path: root/gcc/expr.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/expr.c')
-rw-r--r--gcc/expr.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/expr.c b/gcc/expr.c
index 73e000e..2e97030 100644
--- a/gcc/expr.c
+++ b/gcc/expr.c
@@ -10274,7 +10274,8 @@ expand_expr_real_1 (tree exp, rtx target, machine_mode tmode,
fold_convert_loc (loc, sizetype,
low_bound));
- if (compare_tree_int (index1, TREE_STRING_LENGTH (init)) < 0)
+ if (tree_fits_uhwi_p (index1)
+ && compare_tree_int (index1, TREE_STRING_LENGTH (init)) < 0)
{
tree type = TREE_TYPE (TREE_TYPE (init));
machine_mode mode = TYPE_MODE (type);