re PR tree-optimization/33134 (ICE in set_value_range, at tree-vrp.c:325)

./:	PR tree-optimization/33134
	* tree-vrp.c (adjust_range_with_scev): Call
	set_value_range_to_value.
testsuite/:
	PR tree-optimization/33134
	* g++.dg/tree-ssa/pr33134.C: New test.

From-SVN: r127679
This commit is contained in:
Ian Lance Taylor 2007-08-21 21:35:06 +00:00 committed by Ian Lance Taylor
parent 958ea87b6a
commit cdc6461235
4 changed files with 33 additions and 1 deletions

View file

@ -1,3 +1,9 @@
2007-08-21 Ian Lance Taylor <iant@google.com>
PR tree-optimization/33134
* tree-vrp.c (adjust_range_with_scev): Call
set_value_range_to_value.
2007-08-21 Aldy Hernandez <aldyh@redhat.com>
* value-prof.h (gimple_remove_histogram_value): Remove duplicate

View file

@ -1,3 +1,8 @@
2007-08-21 Ian Lance Taylor <iant@google.com>
PR tree-optimization/33134
* g++.dg/tree-ssa/pr33134.C: New test.
2007-08-21 Nathan Froyd <froydnj@codesourcery.com>
* gcc.target/powerpc/spe-vector-memset.c: New testcase.

View file

@ -0,0 +1,21 @@
/* { dg-do compile } */
/* { dg-options "-O2" } */
/* Used to crash in VRP. */
/* Testcase by Martin Michlmayr <tbm@cyrius.com> */
class FXObject;
class FXStream
{
public:FXStream (const FXObject *cont = __null);
FXStream & operator<< (const unsigned char &v);
};
bool fxsaveGIF (FXStream &store)
{
int bitsperpixel;
unsigned char c1;
c1 = 0x80;
c1 |= (bitsperpixel - 1) << 4;
store << c1;
}

View file

@ -2641,7 +2641,7 @@ adjust_range_with_scev (value_range_t *vr, struct loop *loop, tree stmt,
/* Like in PR19590, scev can return a constant function. */
if (is_gimple_min_invariant (chrec))
{
set_value_range (vr, VR_RANGE, chrec, chrec, vr->equiv);
set_value_range_to_value (vr, chrec, vr->equiv);
return;
}