Possible bug in tree-vrp.c:vrp_visit_phi_node

Diego Novillo dnovillo@redhat.com
Thu Sep 8 14:27:00 GMT 2005


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







More information about the Gcc mailing list