This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH] Kill TREE_OVERFLOW during gimplification
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Richard Guenther <richard dot guenther at gmail dot com>
- Cc: Eric Botcazou <ebotcazou at adacore dot com>, gcc-patches at gcc dot gnu dot org
- Date: Wed, 12 Nov 2008 18:06:10 +0100
- Subject: Re: [PATCH] Kill TREE_OVERFLOW during gimplification
- References: <20081016122954.GE30239@tyan-ft48-01.lab.bos.redhat.com> <email@example.com> <firstname.lastname@example.org>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Wed, Nov 12, 2008 at 09:27:06AM -0600, Richard Guenther wrote:
> > fold_binary reassociates the RHS expression for 'b' into 'a + 2147483647' with
> that re-association is wrong, as it may introduce undefined overflow. The fact
> that we set TREE_OVERFLOW on the constant doesn't say that the addition
Yeah, it shouldn't do reassociation that turns non-overflow constants into
overflow one(s). Many places in fold-const.c try some optimization and if
it results in a new TREE_OVERFLOW, avoid it.
> I know this is all nasty - and the correct thing is to finally disentangle the
> overflow stuff by separating overflowing and non-overflowing operations. But
> for 4.4, Jakub, can you revert the patch?
Ok, I'll bootstrap/regtest it and revert.