This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Kill TREE_OVERFLOW during gimplification


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
> overflows.

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.

	Jakub


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]