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))) > { > > > > > >