This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/30212] [4.1 Regression] C Compiler crash on loop optimization
- From: "rguenth at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 14 Dec 2006 14:28:30 -0000
- Subject: [Bug tree-optimization/30212] [4.1 Regression] C Compiler crash on loop optimization
- References: <bug-30212-13757@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #3 from rguenth at gcc dot gnu dot org 2006-12-14 14:28 -------
#2 0x0000000000830b2f in value_ranges_intersect_p (vr0=0x7fff642afd40,
vr1=0x7fff642afd20)
at /space//rguenther/src/svn/gcc-4_1-branch/gcc/tree-vrp.c:625
625 return (value_inside_range (vr1->min, vr0) == 1
(gdb) print *vr1
$1 = {type = VR_RANGE, min = 0x2b0646d85d50, max = 0x0, equiv = 0xdf5978}
coming from
static void
adjust_range_with_scev (value_range_t *vr, struct loop *loop, tree stmt,
tree var)
{
...
else if (vr->type == VR_RANGE)
{
tree min = vr->min;
tree max = vr->max;
...
else
{
/* If INIT is bigger than VR->MIN, set VR->MIN to INIT. */
if (compare_values (init, min) == 1)
{
min = init;
/* If we just created an invalid range with the minimum
greater than the maximum, take the maximum all the
way to +INF. */
if (compare_values (min, max) == 1)
max = TYPE_MAX_VALUE (TREE_TYPE (max));
}
}
set_value_range (vr, VR_RANGE, min, max, vr->equiv);
where we set max to TYPE_MAX_VALUE (TREE_TYPE (max)), but the original
max of range has pointer type bounds which don't have TYPE_MIN/MAX_VALUEs set.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30212