Commit 253c0172 by Richard Biener Committed by Richard Biener

re PR tree-optimization/78788 (ICE (segfault) on s390x-linux-gnu)

2016-12-14  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/78788
	* tree-vrp.c (set_value_range): Allow [-INF(OVF), +INF(OVF)].
	(set_and_canonicalize_value_range): Do not drop the above to
	VARYING.

	* gcc.dg/torture/pr78788.c: New testcase.

From-SVN: r243631
parent 803312a7
2016-12-14 Richard Biener <rguenther@suse.de>
PR tree-optimization/78788
* tree-vrp.c (set_value_range): Allow [-INF(OVF), +INF(OVF)].
(set_and_canonicalize_value_range): Do not drop the above to
VARYING.
2016-12-13 Bill Schmidt <wschmidt@linux.vnet.ibm.com> 2016-12-13 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
* config/rs6000/rs600.c (rs6000_builtin_vectorization_cost): * config/rs6000/rs600.c (rs6000_builtin_vectorization_cost):
2016-12-14 Richard Biener <rguenther@suse.de>
PR tree-optimization/78788
* gcc.dg/torture/pr78788.c: New testcase.
2016-12-13 Nathan Sidwell <nathan@acm.org> 2016-12-13 Nathan Sidwell <nathan@acm.org>
PR c++/69481 PR c++/69481
......
/* { dg-do compile } */
int a;
long b;
long c;
void d()
{
int e = 0;
for (; b; b++)
if (c)
{
e++;
e++;
}
while (e)
a = e -= 2;
}
...@@ -365,10 +365,6 @@ set_value_range (value_range *vr, enum value_range_type t, tree min, ...@@ -365,10 +365,6 @@ set_value_range (value_range *vr, enum value_range_type t, tree min,
cmp = compare_values (min, max); cmp = compare_values (min, max);
gcc_assert (cmp == 0 || cmp == -1 || cmp == -2); gcc_assert (cmp == 0 || cmp == -1 || cmp == -2);
if (needs_overflow_infinity (TREE_TYPE (min)))
gcc_assert (!is_overflow_infinity (min)
|| !is_overflow_infinity (max));
} }
if (flag_checking if (flag_checking
...@@ -506,14 +502,9 @@ set_and_canonicalize_value_range (value_range *vr, enum value_range_type t, ...@@ -506,14 +502,9 @@ set_and_canonicalize_value_range (value_range *vr, enum value_range_type t,
} }
} }
/* Drop [-INF(OVF), +INF(OVF)] to varying. */ /* Do not drop [-INF(OVF), +INF(OVF)] to varying. (OVF) has to be sticky
if (needs_overflow_infinity (TREE_TYPE (min)) to make sure VRP iteration terminates, otherwise we can get into
&& is_overflow_infinity (min) oscillations. */
&& is_overflow_infinity (max))
{
set_value_range_to_varying (vr);
return;
}
set_value_range (vr, t, min, max, equiv); set_value_range (vr, t, min, max, equiv);
} }
......
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