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: Laurent GUERBY <laurent at guerby dot net>
- To: Diego Novillo <dnovillo at redhat dot com>
- Cc: Richard Kenner <kenner at vlsi1 dot ultra dot nyu dot edu>, gcc at gcc dot gnu dot org
- Date: Thu, 08 Sep 2005 22:25:21 +0200
- Subject: Re: Possible bug in tree-vrp.c:vrp_visit_phi_node
- References: <10509052139.AA02473@vlsi1.ultra.nyu.edu> <43204A4F.9010203@redhat.com>
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)))
> {
>
>
>
>
>
>