This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH]: Latent bug in value numbering (Was Re: latent bug inPRE?)
- From: Richard Guenther <rguenth at tat dot physik dot uni-tuebingen dot de>
- To: Daniel Berlin <dberlin at dberlin dot org>
- Cc: gcc at gcc dot gnu dot org, <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 15 Feb 2005 15:49:54 +0100 (CET)
- Subject: Re: [PATCH]: Latent bug in value numbering (Was Re: latent bug inPRE?)
On Tue, 15 Feb 2005, Daniel Berlin wrote:
> On Tue, 2005-02-15 at 11:31 +0100, Richard Guenther wrote:
>
> > Wether fully_constant_expression
> > is in error, or the assert, I do not know. But I guess other
> > kind of folding could trigger this, too.
>
> Neither is really in error, it should catch exactly this case :).
> This is a real bug, but in get_value_handle.
>
> Fully_constant_expression only returns something other than what you
> passed it when it folded to something to an is_gimple_min_invariant.
> get_value_handle MUST return the expression when handed an
> is_gimple_min_invariant thing.
>
> And we have a winner!
> get_value_handle is returning NULL instead of expr when handed your
> expression.
>
> Move the is_gimple_min_invariant check in get_value_handle above the
> other checks, and your bug should be fixed.
>
> I'll add a comment stating that get_value_handle is *required* to return
> the expression when it is is_gimple_min_invariant when I do that.
>
> Please try the attached
Indeed, the patch fixes the problem and I'm happy again ;)
Thanks for the quick fix,
Richard.
--
Richard Guenther <richard dot guenther at uni-tuebingen dot de>
WWW: http://www.tat.physik.uni-tuebingen.de/~rguenth/