diff options
author | Richard Biener <rguenther@suse.de> | 2017-03-09 13:20:50 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2017-03-09 13:20:50 +0000 |
commit | 16967aff7a209389283280a17ef08f2fe206fed3 (patch) | |
tree | 0fb1cda8b2c5fab8da11d73209f3aefa3d5399b4 /gcc/gimple-expr.c | |
parent | 26d7dc48b628d0fa16f2a1660b23602821c748f9 (diff) | |
download | gcc-16967aff7a209389283280a17ef08f2fe206fed3.zip gcc-16967aff7a209389283280a17ef08f2fe206fed3.tar.gz gcc-16967aff7a209389283280a17ef08f2fe206fed3.tar.bz2 |
re PR target/79971 (ICE in const_binop, at fold-const.c:1554 on ARM target with saturated integers)
2017-03-09 Richard Biener <rguenther@suse.de>
PR middle-end/79971
* gimple-expr.c (useless_type_conversion_p): Preserve
TYPE_SATURATING for fixed-point types.
* gcc.dg/fixed-point/pr79971.c: New testcase.
From-SVN: r246002
Diffstat (limited to 'gcc/gimple-expr.c')
-rw-r--r-- | gcc/gimple-expr.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/gimple-expr.c b/gcc/gimple-expr.c index 2ee87c2..9d8034c 100644 --- a/gcc/gimple-expr.c +++ b/gcc/gimple-expr.c @@ -124,7 +124,7 @@ useless_type_conversion_p (tree outer_type, tree inner_type) /* Fixed point types with the same mode are compatible. */ else if (FIXED_POINT_TYPE_P (inner_type) && FIXED_POINT_TYPE_P (outer_type)) - return true; + return TYPE_SATURATING (inner_type) == TYPE_SATURATING (outer_type); /* We need to take special care recursing to pointed-to types. */ else if (POINTER_TYPE_P (inner_type) |