Commit 9e9f6bf0 by Richard Biener Committed by Richard Biener

re PR tree-optimization/61482 (ICE in set_value_range, at tree-vrp.c:453 when…

re PR tree-optimization/61482 (ICE in set_value_range, at tree-vrp.c:453 when compiling Firefox ESR 24)

2014-06-16  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/61482
	* tree-vrp.c (adjust_range_with_scev): Avoid setting of
	[-INF(OVF), +INF(OVF)] range.

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

From-SVN: r211709
parent 7964957f
2014-06-16 Richard Biener <rguenther@suse.de>
PR tree-optimization/61482
* tree-vrp.c (adjust_range_with_scev): Avoid setting of
[-INF(OVF), +INF(OVF)] range.
2014-06-16 Ganesh Gopalasubramanian <Ganesh.Gopalasubramanian@amd.com> 2014-06-16 Ganesh Gopalasubramanian <Ganesh.Gopalasubramanian@amd.com>
* config/i386/i386.c (ix86_expand_sse2_mulvxdi3): Issue * config/i386/i386.c (ix86_expand_sse2_mulvxdi3): Issue
......
2014-06-16 Richard Biener <rguenther@suse.de>
PR tree-optimization/61482
* g++.dg/torture/pr61482.C: New testcase.
2014-06-16 Ganesh Gopalasubramanian <Ganesh.Gopalasubramanian@amd.com> 2014-06-16 Ganesh Gopalasubramanian <Ganesh.Gopalasubramanian@amd.com>
* gcc.target/i386/xop-imul64-vector.c: Remove the check for * gcc.target/i386/xop-imul64-vector.c: Remove the check for
......
// { dg-do compile }
class A
{
public:
int m_fn1 ();
};
class B
{
void m_fn2 (const int &p1);
A mThebesLayerDataStack;
};
int b, c;
void B::m_fn2 (const int &p1)
{
if (c && b)
{
int i;
i = mThebesLayerDataStack.m_fn1 ();
for (; i >= 0;)
{
++i;
break;
}
--i;
for (; i >= 0; --i)
mThebesLayerDataStack.m_fn1 ();
}
}
...@@ -3892,15 +3892,6 @@ adjust_range_with_scev (value_range_t *vr, struct loop *loop, ...@@ -3892,15 +3892,6 @@ adjust_range_with_scev (value_range_t *vr, struct loop *loop,
max = init; max = init;
else else
min = init; min = init;
/* If we would create an invalid range, then just assume we
know absolutely nothing. This may be over-conservative,
but it's clearly safe, and should happen only in unreachable
parts of code, or for invalid programs. */
if (compare_values (min, max) == 1)
return;
set_value_range (vr, VR_RANGE, min, max, vr->equiv);
} }
else if (vr->type == VR_RANGE) else if (vr->type == VR_RANGE)
{ {
...@@ -3933,16 +3924,20 @@ adjust_range_with_scev (value_range_t *vr, struct loop *loop, ...@@ -3933,16 +3924,20 @@ adjust_range_with_scev (value_range_t *vr, struct loop *loop,
|| compare_values (tmax, max) == -1) || compare_values (tmax, max) == -1)
max = tmax; max = tmax;
} }
}
else
return;
/* If we just created an invalid range with the minimum /* If we just created an invalid range with the minimum
greater than the maximum, we fail conservatively. greater than the maximum, we fail conservatively.
This should happen only in unreachable This should happen only in unreachable
parts of code, or for invalid programs. */ parts of code, or for invalid programs. */
if (compare_values (min, max) == 1) if (compare_values (min, max) == 1
return; || (is_negative_overflow_infinity (min)
&& is_positive_overflow_infinity (max)))
return;
set_value_range (vr, VR_RANGE, min, max, vr->equiv); set_value_range (vr, VR_RANGE, min, max, vr->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