mirror of
https://gcc.gnu.org/git/gcc.git
synced 2026-02-22 03:46:53 -05:00
re PR tree-optimization/31345 (ICE in set_value_range, at tree-vrp.c:269)
./: PR tree-optimization/31345 * tree-vrp.c (extract_range_from_binary_expr): Turn ranges like [+INF, +INF(OVF)] into VARYING. testsuite/: PR tree-optimization/31345 * gcc.c-torture/compile/pr31345-1.c: New test. From-SVN: r123254
This commit is contained in:
committed by
Ian Lance Taylor
parent
3966d30d9c
commit
485d8ee616
@@ -1,3 +1,9 @@
|
||||
2007-03-26 Ian Lance Taylor <iant@google.com>
|
||||
|
||||
PR tree-optimization/31345
|
||||
* tree-vrp.c (extract_range_from_binary_expr): Turn ranges like
|
||||
[+INF, +INF(OVF)] into VARYING.
|
||||
|
||||
2007-03-23 Martin Michlmayr <tbm@cyrius.com>
|
||||
|
||||
* doc/invoke.texi (-fforce-mem): Update documentation to reflect
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
2007-03-26 Ian Lance Taylor <iant@google.com>
|
||||
|
||||
PR tree-optimization/31345
|
||||
* gcc.c-torture/compile/pr31345-1.c: New test.
|
||||
|
||||
2007-03-22 Mark Mitchell <mark@codesourcery.com>
|
||||
|
||||
PR c++/30863
|
||||
|
||||
24
gcc/testsuite/gcc.c-torture/compile/pr31345-1.c
Normal file
24
gcc/testsuite/gcc.c-torture/compile/pr31345-1.c
Normal file
@@ -0,0 +1,24 @@
|
||||
/* PR tree-optimization/31345
|
||||
This caused a crash in VRP when dealing with overflow infinities. */
|
||||
|
||||
void
|
||||
dpsnaffle (const char *kbuf)
|
||||
{
|
||||
int hash, thash, head[2], off;
|
||||
{
|
||||
int _DP_i;
|
||||
(hash) = 19780211;
|
||||
{
|
||||
(hash) = (hash) + (kbuf)[_DP_i];
|
||||
}
|
||||
(hash) = ((hash) * 43321879) & 0x7FFFFFFF;
|
||||
}
|
||||
while (off != 0)
|
||||
{
|
||||
if (hash > thash) {}
|
||||
else if (hash < thash)
|
||||
{
|
||||
off = head[2];
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1892,10 +1892,18 @@ extract_range_from_binary_expr (value_range_t *vr, tree expr)
|
||||
return;
|
||||
}
|
||||
|
||||
/* We punt if:
|
||||
1) [-INF, +INF]
|
||||
2) [-INF, +-INF(OVF)]
|
||||
3) [+-INF(OVF), +INF]
|
||||
4) [+-INF(OVF), +-INF(OVF)]
|
||||
We learn nothing when we have INF and INF(OVF) on both sides.
|
||||
Note that we do accept [-INF, -INF] and [+INF, +INF] without
|
||||
overflow. */
|
||||
if ((min == TYPE_MIN_VALUE (TREE_TYPE (min))
|
||||
|| is_negative_overflow_infinity (min))
|
||||
|| is_overflow_infinity (min))
|
||||
&& (max == TYPE_MAX_VALUE (TREE_TYPE (max))
|
||||
|| is_positive_overflow_infinity (max)))
|
||||
|| is_overflow_infinity (max)))
|
||||
{
|
||||
set_value_range_to_varying (vr);
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user