Commit 16967aff by Richard Biener Committed by Richard Biener

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
parent 26d7dc48
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.
2017-03-09 Richard Biener <rguenther@suse.de>
PR ipa/79970
* ipa-prop.c (ipa_modify_formal_parameters): Avoid changing
alignment of BLKmode params.
......
......@@ -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)
......
2017-03-09 Richard Biener <rguenther@suse.de>
PR middle-end/79971
* gcc.dg/fixed-point/pr79971.c: New testcase.
2017-03-09 Richard Biener <rguenther@suse.de>
PR ipa/79970
* gcc.dg/torture/pr79970.c: New testcase.
......
/* { dg-do compile } */
/* { dg-options "-O3" } */
void
a ()
{
unsigned _Accum b;
for (b = 0.1; b; b += 0.1uk)
{
_Sat unsigned _Accum b;
for (b = 0; b <= 0.8; b = 0.1)
;
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment