This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Latent bug in update_equiv_regs?
- From: Ian Lance Taylor <iant at google dot com>
- To: Jeff Law <law at redhat dot com>
- Cc: GCC <gcc at gcc dot gnu dot org>
- Date: Wed, 19 Aug 2009 16:46:57 -0700
- Subject: Re: Latent bug in update_equiv_regs?
- References: <4A8C8A42.3020008@redhat.com>
Jeff Law <law@redhat.com> writes:
> Somehow I can't help but think I'm missing something here...
>
> Given:
>
> (set (reg X) (mem Y))
>
> (...)
>
> (set (mem Y) (reg Z))
>
> (...)
>
> (use (reg X))
>
>
>
> update_equiv_regs can set an equivalence between (reg X) and (mem Y)
> which is clearly wrong as (mem Y) is set to (reg Z).
My understanding is that that scenario is supposed to not happen because
update_equiv_regs is only supposed to equate a register and a memory
location in the specific cases where that is OK. It's not no_equiv that
is supposed to fix this, the equivalence should only be created when it
will always be OK.
So I think you need to explain more about why the equivalence was
created.
Ian