Commit 87c4dace by Richard Biener Committed by Richard Biener

re PR c++/83713 (ICE in do_narrow at gcc/convert.c:474)

2018-01-08  Richard Biener  <rguenther@suse.de>

	PR middle-end/83713
	* convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.

	* g++.dg/torture/pr83713.C: New testcase.

From-SVN: r256341
parent 960c02b8
2018-01-08 Richard Biener <rguenther@suse.de>
PR middle-end/83713
* convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
2018-01-08 Richard Biener <rguenther@suse.de>
PR tree-optimization/83685
* tree-ssa-pre.c (create_expression_by_pieces): Do not insert
references to abnormals.
......
......@@ -471,8 +471,10 @@ do_narrow (location_t loc,
type in case the operation in outprec precision
could overflow. Otherwise, we would introduce
signed-overflow undefinedness. */
|| ((!TYPE_OVERFLOW_WRAPS (TREE_TYPE (arg0))
|| !TYPE_OVERFLOW_WRAPS (TREE_TYPE (arg1)))
|| ((!(INTEGRAL_TYPE_P (TREE_TYPE (arg0))
&& TYPE_OVERFLOW_WRAPS (TREE_TYPE (arg0)))
|| !(INTEGRAL_TYPE_P (TREE_TYPE (arg1))
&& TYPE_OVERFLOW_WRAPS (TREE_TYPE (arg1))))
&& ((TYPE_PRECISION (TREE_TYPE (arg0)) * 2u
> outprec)
|| (TYPE_PRECISION (TREE_TYPE (arg1)) * 2u
......
2018-01-08 Richard Biener <rguenther@suse.de>
PR middle-end/83713
* g++.dg/torture/pr83713.C: New testcase.
2018-01-08 Tom de Vries <tom@codesourcery.com>
* gcc.dg/tree-ssa/ssa-dom-cse-2.c: Xfail scan for nvptx.
......
// { dg-do compile }
class a
{
char b;
void c ();
};
void
a::c ()
{
&b + ((long long) &b & 0);
}
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