Commit 48fcd201 by Jakub Jelinek Committed by Jakub Jelinek

re PR middle-end/86122 (ICE in useless_type_conversion_p, at gimple-expr.c:87)

	PR middle-end/86122
	* match.pd ((A +- CST1) +- CST2): Punt if last resort
	unsigned_type_for returns NULL.

	* gcc.c-torture/compile/pr86122.c: New test.

From-SVN: r261606
parent bc04d1ff
2018-06-14 Jakub Jelinek <jakub@redhat.com>
PR middle-end/86122
* match.pd ((A +- CST1) +- CST2): Punt if last resort
unsigned_type_for returns NULL.
PR target/85945
* lower-subreg.c (find_decomposable_subregs): Don't decompose float
subregs of multi-word pseudos unless the float mode has word size.
......
......@@ -1771,10 +1771,11 @@ DEFINE_INT_AND_FLOAT_ROUND_FN (RINT)
(neg_inner_op @0 { wide_int_to_tree (type, wi::to_wide (cst)); })
/* Last resort, use some unsigned type. */
(with { tree utype = unsigned_type_for (type); }
(if (utype)
(view_convert (inner_op
(view_convert:utype @0)
(view_convert:utype
{ drop_tree_overflow (cst); })))))))))))))
{ drop_tree_overflow (cst); }))))))))))))))
/* (CST1 - A) +- CST2 -> CST3 - A */
(for outer_op (plus minus)
......
2018-06-14 Jakub Jelinek <jakub@redhat.com>
PR middle-end/86122
* gcc.c-torture/compile/pr86122.c: New test.
P0624R2 - Default constructible and assignable stateless lambdas
* g++.dg/cpp2a/lambda1.C: New test.
* g++.dg/cpp0x/lambda/lambda-ice2.C: Adjust expected diagnostics
......
/* PR middle-end/86122 */
_Complex int
foo (_Complex int x)
{
x += __INT_MAX__;
x += 1;
return x;
}
_Complex int
bar (_Complex int x)
{
x += 1;
x += __INT_MAX__;
return x;
}
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