This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PATCH COMMITTED: gcc 4.2 support for -Wstrict-overflow/-fstrict-overflow
"Richard Guenther" <richard.guenther@gmail.com> writes:
> I didn't notice it flushed to varying. It does so for wrapping semantics
> (but I have patches to improve this), not for undefined overflow
> semantics. So I think these cases are unchanged with your patch.
I mean these lines in extract_range_from_binary_expr (this is the
version from before my patch):
if (!is_gimple_min_invariant (min) || TREE_OVERFLOW (min)
|| !is_gimple_min_invariant (max) || TREE_OVERFLOW (max))
{
set_value_range_to_varying (vr);
return;
}
Those lines are now:
if (min == NULL_TREE
|| !is_gimple_min_invariant (min)
|| (TREE_OVERFLOW (min) && !is_overflow_infinity (min))
|| max == NULL_TREE
|| !is_gimple_min_invariant (max)
|| (TREE_OVERFLOW (max) && !is_overflow_infinity (max)))
{
set_value_range_to_varying (vr);
return;
}
Ian