This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/54014] Value Range propagation bug
- From: "ferrandi at elet dot polimi.it" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 18 Jul 2012 17:41:48 +0000
- Subject: [Bug tree-optimization/54014] Value Range propagation bug
- Auto-submitted: auto-generated
- References: <bug-54014-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54014
--- Comment #4 from Fabrizio Ferrandi <ferrandi at elet dot polimi.it> 2012-07-18 17:41:48 UTC ---
Maybe I missing something but there is a specific code that deals with this
undefined behavior in tree-vrp.c:
else if (code == ABS_EXPR
&& !TYPE_UNSIGNED (type))
{
/* -TYPE_MIN_VALUE = TYPE_MIN_VALUE with flag_wrapv so we can't get a
useful range. */
if (!TYPE_OVERFLOW_UNDEFINED (type)
&& ((vr0.type == VR_RANGE
&& vrp_val_is_min (vr0.min))
|| (vr0.type == VR_ANTI_RANGE
&& !vrp_val_is_min (vr0.min)
&& !range_includes_zero_p (&vr0))))
{
set_value_range_to_varying (vr);
return;
}
This code is from gcc 4.5.3 and it still survives in gcc 4.7.1. I've spent some
further time on this issues and it seems that the range does not come from abs
restriction. I will spend some further effort later.