This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Avoid introducing TREE_OVERFLOWs in (T)(x&cst) -> (T)x & (T)cst optimization (PR middle-end/19857)
- From: Eric Botcazou <ebotcazou at libertysurf dot fr>
- To: Roger Sayle <roger at eyesopen dot com>
- Cc: gcc-patches at gcc dot gnu dot org,Jakub Jelinek <jakub at redhat dot com>
- Date: Tue, 15 Feb 2005 18:38:26 +0100
- Subject: Re: [PATCH] Avoid introducing TREE_OVERFLOWs in (T)(x&cst) -> (T)x & (T)cst optimization (PR middle-end/19857)
- References: <Pine.LNX.4.44.0502150743020.26988-100000@www.eyesopen.com>
> However, I believe that all of these problems will go away in
> the near future, once the middle-end stops setting TREE_OVERFLOW
> and TREE_CONSTANT_OVERFLOW in fold_const. I've already posted a
> patch at http://gcc.gnu.org/ml/gcc-patches/2005-01/msg00030.html
> The only thing blocking that patch was that a C front-end maintainer
> wanted me to write an extensive set of C test cases to check that
> the C front-end would generate all the required diagnostics.
Sorry if this has already been mentioned, but I think your patch might be
harmful to the Ada compiler, at least without specific counter-measures. My
understanding is that gigi relies on TREE_OVERFLOW being set by fold to issue
warnings and detect CONSTRAINT_ERRORs at compile-time. And, in some cases,
that's vital (from Ada's viewpoint) because things would wrap around in the
target's arithmetics, hence would go unnoticed at run-time.
In any cases, if you don't mind, I think you should seek some form of buy-in
from Richard Kenner.
--
Eric Botcazou