diff options
Diffstat (limited to 'gcc/fold-const.c')
| -rw-r--r-- | gcc/fold-const.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/fold-const.c b/gcc/fold-const.c index fc72b9b38a2..e1e04bb625d 100644 --- a/gcc/fold-const.c +++ b/gcc/fold-const.c @@ -2396,7 +2396,8 @@ fold_convert_const (enum tree_code code, tree type, tree arg1) if (TREE_TYPE (arg1) == type) return arg1; - if (POINTER_TYPE_P (type) || INTEGRAL_TYPE_P (type)) + if (POINTER_TYPE_P (type) || INTEGRAL_TYPE_P (type) + || TREE_CODE (type) == OFFSET_TYPE) { if (TREE_CODE (arg1) == INTEGER_CST) return fold_convert_const_int_from_int (type, arg1); |
