[patch] tree-vrp.c: Fix PR tree-optimization/25382.

Diego Novillo dnovillo@redhat.com
Wed Dec 21 01:34:00 GMT 2005


On Tuesday 20 December 2005 19:27, Kazu Hirata wrote:

> 	PR tree-optimization/25382.
> 	* gcc.dg/tree-ssa/pr25382.c: New.
>
OK.

As a follow up patch, could you please change uses of 'vr0.type' to a new 
local variable 'type'?  Otherwise, we get some potentially confusing uses 
like:

> +      else if (vr1.type == VR_RANGE
> +	  && vr1.min == vr1.max
> +	  && tree_expr_nonnegative_p (vr1.max)
> +	  && TREE_CODE (vr1.max) == INTEGER_CST)
> +	{
> +	  vr0.type = VR_RANGE;
>
This threw me off for a few seconds.  If that read 'type = VR_RANGE' then 
the very last call to set_value_range can read 'set_value_range (vr, type, 
min, max, NULL)'.  You may also need to update other uses of vr0.type in 
the function.


Thanks.



More information about the Gcc-patches mailing list