This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Avoid creating TREE_OVERFLOW constants in convert_to_integer (PR middle-end/26729)
- From: Eric Botcazou <ebotcazou at adacore dot com>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Thu, 20 Apr 2006 07:52:37 +0200
- Subject: Re: [PATCH] Avoid creating TREE_OVERFLOW constants in convert_to_integer (PR middle-end/26729)
- References: <20060419223008.GC18543@devserv.devel.redhat.com>
> convert_to_integer seems to optimize truncation (shouldn't that be solely
> fold's job?), but during that can create integer overflowed constants that
> mess optimizers later on.
Yes, see for example http://gcc.gnu.org/ml/gcc/2006-03/msg00719.html and
http://gcc.gnu.org/ml/gcc-patches/2006-03/msg01819.html. This code is a
mess.
> The following patch fixes that by doing the same that e.g. the C frontend
> does after calling convert - dropping the overflow bit if it was introduced
> during the optimization.
Would this not modify the interface front-end/middle-end wrt TREE_OVERFLOW?
> Bootstrapped/regtested on x86_64-linux, ok for trunk/4.1?
Please do not put this on the 4.1 branch. Kazu's patch has already introduced
regressions for Ada there (which have not been fixed yet) and I think your
patch could introduce more.
--
Eric Botcazou