diff options
Diffstat (limited to 'gcc/tree-chrec.c')
-rw-r--r-- | gcc/tree-chrec.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/gcc/tree-chrec.c b/gcc/tree-chrec.c index 9711e20..18ed4ed 100644 --- a/gcc/tree-chrec.c +++ b/gcc/tree-chrec.c @@ -1293,6 +1293,8 @@ keep_cast: if (use_overflow_semantics && (TREE_CODE (chrec) == PLUS_EXPR || TREE_CODE (chrec) == MINUS_EXPR) + && TREE_CODE (type) == INTEGER_TYPE + && TREE_CODE (ct) == INTEGER_TYPE && TYPE_PRECISION (type) > TYPE_PRECISION (ct) && TYPE_OVERFLOW_UNDEFINED (ct)) res = fold_build2 (TREE_CODE (chrec), type, |