summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/tree-eh.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/gcc/tree-eh.c b/gcc/tree-eh.c
index 06941cd1745..becfad32c83 100644
--- a/gcc/tree-eh.c
+++ b/gcc/tree-eh.c
@@ -2651,14 +2651,14 @@ tree_could_trap_p (tree expr)
if (TREE_CODE (TREE_OPERAND (expr, 0)) == ADDR_EXPR)
{
tree base = TREE_OPERAND (TREE_OPERAND (expr, 0), 0);
- double_int off = mem_ref_offset (expr);
- if (off.is_negative ())
+ offset_int off = mem_ref_offset (expr);
+ if (wi::neg_p (off, SIGNED))
return true;
if (TREE_CODE (base) == STRING_CST)
- return double_int::from_uhwi (TREE_STRING_LENGTH (base)).ule (off);
+ return wi::leu_p (TREE_STRING_LENGTH (base), off);
else if (DECL_SIZE_UNIT (base) == NULL_TREE
|| TREE_CODE (DECL_SIZE_UNIT (base)) != INTEGER_CST
- || tree_to_double_int (DECL_SIZE_UNIT (base)).ule (off))
+ || wi::leu_p (wi::to_offset (DECL_SIZE_UNIT (base)), off))
return true;
/* Now we are sure the first byte of the access is inside
the object. */