This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Possible bug in tree-vrp.c:vrp_visit_phi_node


FYI, this fixes both PR ada/23141 and ada/23142.

Laurent

On Thu, 2005-09-08 at 10:27 -0400, Diego Novillo wrote:
> On 09/05/05 17:39, Richard Kenner wrote:
> 
> >Shouldn't the test be that both lhs_vr *and* vr_result are VR_RANGE?
> >  
> >
> Yes, good catch.  If that fixes your testcase, please apply the fix.  
> You are referring to this, right?
> 
> --- tree-vrp.c  7 Sep 2005 20:35:19 -0000       2.54
> +++ tree-vrp.c  8 Sep 2005 14:26:55 -0000
> @@ -3495,7 +3495,7 @@ vrp_visit_phi_node (tree phi)
>    /* To prevent infinite iterations in the algorithm, derive ranges
>       when the new value is slightly bigger or smaller than the
>       previous one.  */
> -  if (lhs_vr->type == VR_RANGE)
> +  if (lhs_vr->type == VR_RANGE && vr_result.type == VR_RANGE)
>      {
>        if (!POINTER_TYPE_P (TREE_TYPE (lhs)))
>         {
> 
> 
> 
> 
> 
> 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]