This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Possible bug in tree-vrp.c:vrp_visit_phi_node
- From: Diego Novillo <dnovillo at redhat dot com>
- To: Richard Kenner <kenner at vlsi1 dot ultra dot nyu dot edu>
- Cc: gcc at gcc dot gnu dot org
- Date: Thu, 08 Sep 2005 10:27:27 -0400
- Subject: Re: Possible bug in tree-vrp.c:vrp_visit_phi_node
- References: <10509052139.AA02473@vlsi1.ultra.nyu.edu>
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)))
{